How to snap control point curve into new point

Hello everyone^^

I need a help about how to snap control point curve into new point… i have one polyline the polyline that have control point (in the pic is green point) i want to change it to another point ( the red point). i attach the file too…

sorry for my bad english
best regards,
Ryee

The result i want

How to Snap point into curve.gh (13.4 KB)

How to Snap point into curve a.gh (28.2 KB)