Estimating Galactic Distances From Images Using Self-supervised Representation Learning