parallel getNearestCentroid DONE