There is a long way to do this and a short way.
The long way is to find the slope of the line, the the equation of the perpendicular to it through the point, the point of intersection of the perpendicular and the line and last the distance between those 2 points.
The short way is the formula for the distance between a point and a line.
If the line is Ax + By + C = 0 and the point is (x0,y0), the distance is
(Axo + By0 + C)/sqrt(A2+ B2).
The derivation of the formula is too long for me to prove it to you here.