There is exactly one value of $x$ for which the distance from $(5,6)$ to $(3x-7,ax+2)$ is $4$. If $a \neq 0,$ what is $a$?