It unfortunately is illegal to bring a firearm into New York State without having a permit to possess it there. The law is confusing and people are arrested every day for unknowingly breaking their law.
While it is every individual's responsibility to at least gain a basic understanding of the laws of the place they're traveling to, it is egregious that NY and other jurisdictions nail well-meaning people like this and locking them up, rather than exercising discretion.
(handgunlaw.us is your best friend, btw)