DistCentering function

An auxiliary function that properly transforms the distance matrix X