Non-VEX approach:
Use Ray set to Points, Minimum Distance to raycast your curve to the surface of the tube. You can merge the original curve with the raycast one, then Skin with Connectivity set to Columns. The length of each line can be computed using Measure and Attribute Promote and Transfer that value back to the points to get your distance. You can also get the average distance of all the points if you use Attribute Promote set to the Average Promotion Method, and the New Class set to Detail.
VEX approach:
Create a Point Wrangle, connect the curve to first input and tube to second input, then use the following snippet:
vector hit = minpos(1, @P);
f@dist = distance(hit, @P);
For average distance, again you can use Attribute Promote (Average) to Detail.