A construction contractor was caught with a loaded gun at a busy New York airport, federal officials said.