Simply using `BezierFunction` is not enough. The `BezierFunction` will not match the `BezierCurve` because that curve is actually a composite of multiple splines - see here: https://mathematica.stackexchange.com/questions/186949/beziercurve-is-different-from-bezierfunction.
This below is adapted from the above and @J. M.'s technical difficulties solution:
You need to first chop your spline into its components and minimize over both, then find which closest point on each sub-spline is closer to your point.
See here on how to produce the parts: https://mathematica.stackexchange.com/questions/203261/how-to-construct-bezierfunction-for-beziercurve-with-npts4-and-splinedegree
```
pt = {-0.07194, 0.6342};
pts = {{-3, 0}, {-1, 3}, {1, -3}, {0, 1}, {0, 2}, {2, 2}, {-2, -2}};
bzsplinefns = BezierFunction /@ Partition[pts, 4, 3];
distance[p1_, p2_] := SquaredEuclideanDistance[p1, p2]
splineDistance[spline_, point_, t_?NumericQ] :=
distance[spline[t], point]
closest[spline_, point_] :=
NArgMin[{splineDistance[spline, point, t], 0 < t < 1}, t]
tvals = closest[#, pt] & /@ bzsplinefns;
finalNearestPoint =
MinimalBy[MapThread[#1[#2] &, {bzsplinefns, tvals}],
distance[#, pt] &][[1]]
Graphics[{Point[pt], Thick, Gray, BezierCurve[pts], Thin,
{RandomColor[], Line[Table[#[t], {t, 0, 1, 0.01}]]} & /@
bzsplinefns, PointSize[Large], Point[finalNearestPoint]}]
```
[![bezier splines][1]][1]
If you choose `BSplineCurve` instead, you don't need to worry about breaking it into multiple `BSplineFunctions` - you can just minimize a single `BSplineFunction` that accounts for the whole curve.
```
pt = {-0.07194, 0.6342};
pts = {{-3, 0}, {-1, 3}, {1, -3}, {0, 1}, {0, 2}, {2, 2}, {-2, -2}};
distance[p1_, p2_] := SquaredEuclideanDistance[p1, p2]
splineDistance[spline_, point_, t_?NumericQ] :=
distance[spline[t], point]
closest[spline_, point_] :=
NArgMin[{splineDistance[spline, point, t], 0 < t < 1}, t]
bsp = BSplineFunction[pts];
result = bsp[closest[bsp, pt]]
Graphics[{BSplineCurve[pts], Point[pt], PointSize[Large],
Point[result]}]
```
[![bspline nearest point][2]][2]
[1]: https://i.sstatic.net/bYCJ2.png
[2]: https://i.sstatic.net/W7osE.png