Flight 2059 from Everett, Washington, was bound for San Francisco when it was diverted to Portland, where Joseph David Emerson was booked on 83 counts of attempted murder.
I'm pretty sure all commercial airplanes have to be able to do this. And I'm even more sure that a gliding landing is part of their aircraft certification training
All aircraft can glide, of course. They also have a ram air turbine to power control surfaces even with engine or APU power. And it has been done before such as Air Canada Flight 143 (the famous Gimli Glider), and Air Transat Flight 236 (the Azores glider)
But you can generally at best go 12 times your altitude, so even at cruise altitude, you need somewhere within 60 miles or so to put down. It certainly would have been far harder to put down unpowered.