As you have been told, you must use your NJ driver license to buy a gun. That means you must also have a NJ Firearms Purchaser ID card. This entails fingerprinting, background check, references and money then waiting up to six months.

If you have a home and live in PA for part of the year, and will keep the gun there, the best thing to do is renounce NJ citizenship and simply get a PA driver license and change the tags on your car to PA plates. This may also have positive tax implications.