Truck stopped accelerating then stopped?

I was going 40 then I noticed the mph was going down. So I pressed the gas down and it didn't do anything.
I'm guessing the engine died because I pulled over and turned the truck off, then tried turning it back on and it didn't. It makes the noise it makes when your truck is just out of battery. It sounds like it's gonna turn on but it doesn't.
What could be wrong with it?
I drive a Ford (that's what's wrong with it lol) expedition

Check possibility of an air lock as the diesel engine - being a compression engine - runs as long as fuel is available. I'm assuming that you have checked that you have sufficient fuel although - occasionally - rough driving makes the fuel swill around the tank and forces air into the fuel system.

If there's an air lock the solution is to "bleed" the system by releasing the injectors and turning the engine on / over until it stays on thus enabling the injectors to be re-tightened.

Other than the fact Ford put a circle around their problems, check your fuel.