More than one telescope separated by a good distance can quite accurately determine the distance of stars in our galaxy.
The diameter distance of the Hubble space telescope orbit is over 13,000 Km and the difference in angle to even some distant objects can estimate far greater distances using triangulation.
Parallax and triangulation, celestial dynamics and laws of physics all come into play.
To my know, within the Milkey Way, we have mapped over 400,000 objects, know their position and distance as well as movement. Still less than .01% of the galaxy.
We don't usually send probes without knowing the distances they will be traveling.