That code will make the last point in the path exactly the requested point regardless of if it could actually reach it or not.
I mentioned that you might want to snap to the closest point on the end node, and that is likely what you need to do here.
path.vectorPath[path.vectorPath.Count-1] = (path.endNode as TriangleMeshNode).ClosestPointOnNode(path.originalEndPoint);