Yes, this is one way to do it, or project a point (which has a vector input) and do distanceto from point to point, (both of these are solutions to the original question asked in this thread), just suggesting it would be nice to just have one node that does distance to with a vector input. But these solutions are easy enough.
Thanks for the advice, this script has been fully developed I think and works for every case I can think of, but in the future I will keep that in mind, it is quite complex (at least for what I am used to) with numerous branches. It seemed so simple at first. But I am happy I got what I wanted.