I think you've misunderstood the theory slightly. It's not the distance from one point to another that creates the difference in the passage of time, it's the difference in speed relative to each other. Simply put, an object traveling close to the speed of light will age more slowly than an object at rest.
The short answer is yes, this is addressed in the Star Trek universe, albeit tangentially. According to the Star Trek TNG: Technical Manual, starfleet vessels are heavily discouraged from traveling at high sublight speeds due to time dilation effects. The "Warp bubble" negates this from happening and means that ships can safely travel at speeds above the speed of light without time dilation occurring:
Guidance of the USS Enterprise at higher sublight velocities couples
the impulse engines with those systems already mentioned. External
sensor readings, distorted by higher relativistic speeds, necessitate
adjustment by the guidance and navigation (G&N) subprocessors in order
to accurately compute ship location and provide proper control inputs
to the impulse engines. Extended travel at high sublight speed is not
a preferred mode of travel for Federation vessels, due to the
undesired time-dilation effects, but may be required occasionally if
warp systems are unavailable.
Today, such time differences can interfere with the requirement for
close synchronization with Starfleet Command as well as overall
Federation timekeeping schemes. Any extended flight at high
relativistic speeds can place mission objectives in jeopardy. At times
when warp propulsion is not available, impulse flight may be
unavoidable, but will require lengthy recalibration of onboard
computer clock systems even if contact is maintained with Starfleet
navigation beacons. It is for this reason that normal impulse
operations are limited to a velocity of 0.25c.