Hint: If the geometry is flat (i.e. R^n) then the distance between a point and a line that is the shortest will have the line formed between the two points be orthogonal to the plane.
This satisfies the relationship l = at + (b-a)(1-t) for the line and <b-a,x-a> = 0 where x is the point you are trying to find the distance for with respect to the line.
You are solving for the vector a in which the distance from x to the line will be the length of x-a or |x-a|.
You can calculate b-a by transforming Ax + By + C = 0 to the form l(t) = at + (b-a)t and then use that to solve for <b-a,x-a> = 0. Also remember that you don't need an actual value for b or a, you only need the direction of the line which corresponds to b-a. You should also make it unit length.
I'll let you fill in the blanks but if you need help just show us where you get stuck.