Hey -
The documentation for FMath::PointDistToLine (FMath::PointDistToLine | Unreal Engine Documentation) says that the intended functionality is to “Calculate the distance of a given Point in world space to a given line.” This seems to imply that the return value is the distance between a stated point and a specified line rather than the Point being on the line. Let us know if this differs from what you’re seeing when using the function.
Cheers