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