Acording to NY state law that conflicts with federal law, no. But in reality you can certainly go through NYS with a gun perfectly legally. Its got to be unloaded & stowed out of reach, away from ammunition.
Federal law says that you can go through any state regardless of that states laws as long as you can legally posess the pistol on both ends of your journey.
Just be aware that if caught you will get arrested & need to prove your case in court. Chances are good you will not see the gun again either.