Finding Distances to Galaxies by Looking at their Neighborhoods