The calculations are roughly the same regardless of what line is used.
Suppose the line has equation $lx+my+nz = d$. In vector form, this is
$$
\mathbf{A}\cdot \mathbf{X} = d,
$$
where $\mathbf{A} = (l,m,n)$. Also, suppose the Bézier curve has equation
$$
\mathbf{X}(t) = (1-t)^3\mathbf{P}_0 + 3t(1-t)^2\mathbf{P}_1 +
3t^2(1-t)\mathbf{P}_2 + t^3\mathbf{P}_3
$$
Substituting this into the previous equation, we get
$$
(1-t)^3(\mathbf{A} \cdot \mathbf{P}_0) +
3t(1-t)^2(\mathbf{A} \cdot \mathbf{P}_1) +
3t^2(1-t)(\mathbf{A} \cdot \mathbf{P}_2) +
t^3(\mathbf{A} \cdot \mathbf{P}_3) - d = 0
$$
This is a cubic equation that you need to solve for $t$. The $t$ values you obtain (at most 3 of them) are the parameter values on the Bézier curve at the intersection points. If any of these $t$ values is outside the interval $[0,1]$, you'll probably want to ignore it.
In your particular case, you know that the line passes through either the start-point or the end-point of the Bézier curve, so either $t=0$ or $t=1$ is a solution of the cubic equation, which makes things easier. Suppose $t=0$ is a solution. Then the cubic above can be written in the form
$$
t(at^2 + bt + c) =0
$$
Now you only have to find $t$ values in $[0,1]$ that satisfy $at^2 + bt +c =0$, which is easy.