At 300,000km from Earth, the gravitation field from the Earth is effectively 0.
How do we have a Moon then? It would have floated away from Earth by now if the gravitation field was effectively 0.
e = Earth
g_e = GM_e/r_e^2 = (6.67e-11)(5.98e24)/(2.4e8)^2 = 0.007 N/kg
Compare this with 9.8 N/kg at the surface. This is "effectively 0". Why do we have a moon? Because (a) it is HUGE compared to a starship (mass = 10^22 kg), and F = mg_e). Second, it's orbital velocity is enough to offset this gravitational pull. If the moon weren't moving, it would fall into us.
Sulu: We're 237,000 km from Earth!
We also don't know the real distance from Earth the scene takes place,
That's very clear as to what the real distance is. Drifting 10,000km here or there doesn't change the physics significantly.
They seem pretty stationary, otherwise, considering the moon is so close (and doesn't drift away). Assuming they were in a direct line-of-sight between the two, they'd have been about 140,000km from the moon. This would decrease the total gravitational field by a marginally small amount, but it would still be directed toward the Earth.