Could be any number of things, from low fuel pressure or plugged injectors, to a hydraulic pump that's locked up, and dozens more. Assuming it's a diesel, for the engine itself to run, it only needs fuel (under adequate pressure at the right time), air, and compression. If it's being bogged down by something else, that's another issue.
If you can keep it running on starting fluid, most likely either it's not getting fuel, or it's not getting it at the right time.
If you can keep it running on starting fluid, most likely either it's not getting fuel, or it's not getting it at the right time.