For the distance, all you need to do is subtract location 1 from location 2, and connect the result to a vector length node.
For the distance, all you need to do is subtract location 1 from location 2, and connect the result to a vector length node.