The aircraft, an Airbus A321, diverted safely to New York-JFK airport.