hm ? seems that the raycast intersect take it all.

The length of the raycast result or the raycast itself?

If using a RayCast node, the length of the raycast itself can be found with the cast_to property using something like cast_to.length. For the result with a RayCast node, you can get the distance from the origin of the raycast to the collision point:

var length = (get_collision_point() - get_global_transform.origin).length()
# for 2D
# var length = (get_collision_point() - global_position)