Your mistake is that you assumed that the acceleration due to gravity $g$ is constant. This is only approximately true over distances which are very much smaller than the average distance of the object from the centre of the planet. The equation $y=vt-\frac12 gt^2$ only applies for constant acceleration $g$.
You need to use the conservation of energy. The initial KE plus gravitational PE at the surface of the planet is equal to the final KE plus gravitational PE at any other point such at that where it comes to rest instantaneously.
If the projectile were not fired vertically but instead at an angle to the vertical it would be necessary also to apply the conservation of angular momentum. In this problem the angular momentum is always zero.
If $v=c$ then Special Relativity Theory ought to apply instead of Newtonian Mechanics, so the kinetic energy would not be $\frac12 mv^2$. However this question assumes that Newtonian Mechanics is still valid when $v=c$. The tags for Special and General Relativity are not needed for this question.