The pilot decided to fly to Kennedy Airport, which has longer runways than Newark Airport.
The pilot changed course and diverted to Kennedy Airport due to the shorter runways at the original destination.