Responding to haertig, I think you should consult an attorney in NJ. For us non-attorneys, we can have a bit of fun, and none of it should count as legal advice. Let me ask you: is there a law that will put you in jail in that situation? You never took possession of the firearm. Since you've declared your firearm, the airline knowingly brought a firearm to New Jersey -- against your will, even! (I seem to recall this would be sort of a gray area.)
What I remember from the course agrees with another poster who says the problem occurs when you try to recheck the bag. That's when they get you for illegally possessing and carrying in the State of New Jersey. That's the law that people violate in this situation.
Also, how does the airline handle unclaimed bags on a diverted flight? Perhaps they will just ship them to the destination. Some years ago I did just that. My flight was diverted because of bad weather. I failed to pick up my bag (no guns or anything funny) because I either missed an announcement or the announcement was never made. By the time I figured it out and went to claim the bag, they said they locked the unclaimed ones away. Anyway, I wasn't the only passenger who didn't get his/her bag -- there was a poor woman screaming that she was on a job interview trip, and she needed this or that from her bag. I flew to my original destination the next day, and my bag was waiting for me there.
I'm not say that's what will happen to you in the hypothetical New Jersey situation. But it's just another thing to keep in mind.
Again, I am not an attorney. I just post online for entertainment purposes only. You're better off with a psychic for legal advice.