Parallax
The method only fails with objects which are so distant that the earth's orbit is too small to get a large enough parallax angle to measure accurately. This distance is about 100 light-years. Astronomers have invented various ways to solve this problem, though none are so accurate as the parallax method is for relatively nearby objects. This provides a basis for the cosmic distance ladder of techniques to calculate greater distances.