Step 1: Using the formula for distance from a point to a line.
The distance of a point $(x_1,y_1)$ from the line $Ax + By + C = 0$ is
\[
\frac{|Ax_1 + By_1 + C|}{\sqrt{A^2 + B^2}}
\] Step 2: Substituting the given values.
Here, $A = 3$, $B = -4$, $C = k$, and the point is $(4,1)$.
\[
\frac{|3(4) - 4(1) + k|}{\sqrt{3^2 + (-4)^2}} = 2
\]
\[
\frac{|12 - 4 + k|}{5} = 2
\]
\[
|8 + k| = 10
\] Step 3: Solving for $k$.
\[
8 + k = 10 \Rightarrow k = 2
\]
\[
8 + k = -10 \Rightarrow k = -18
\] Step 4: Conclusion.
The values of $k$ are $2$ and $-18$.