Finding distances to the stars