The pilot of the plane carrying 247 passengers died from natural causes, according to a Los Angeles Times article. The name of the pilot has not been released, but we know

During the flight, passengers were none the wiser about what occurred in the cockpit. As reported by AP, “Passengers weren’t told of the pilot’s death in flight. During the flight, an announcement was made asking if any doctors were aboard and several passengers approached the cockpit.”
According to an airline spokesperson quoted by various media reports, two co-pilots maintained control of the Boeing 777 plane, ensuring a safe landing at Newark Liberty International Airport at 11:49 a.m. (EST).