Sorting points to match another point list

Okay that changes the question a little bit. Then I would recommend using the node Geometry.DistanceTo, see this example below which I created yesterday for someone else, I think this solution applies for you aswell: