You can do this by finding the equation of the perpendicular line which will give you the co-ordinates of one end of the line you need. Then use the distance formula to get the answer.
Or you can use the formula d =(Ax + By + C)/sqrt(A2 + B2)
where Ax + By + C is the equation of the line in standard form and (x,y) is the point in question.