Implicit Neural Distance Representation for Unsupervised and Supervised Classification of Complex Anatomies