2N3819 is almost obsolete and is available so far as I know only in an TO-92 case. You can carefully bend the leads against the body and mount it "SMD" (dead bug) style.
For that type of application, it should be relatively easily to find a substitute.