The answer's no longer as clear-cut as it used to be when the answer was an unqualified yes. When diesel engines were simpler, cheaper to operate and more durable than gas engines.
When their mileage was much better – and diesel fuel much cheaper.
Diesel engines had fewer parts; they were (and still are) compression-ignition engines, so no spark plugs to wear out and tune-ups were a non-issue because there wasn't really anything to tune. As long as the injector pump worked, the engine usually ran.
And it ran for a long time.
Hundreds of thousands of miles, usually without needing major work during that time. This longevity was a function of both simplicity (fewer parts, less to go wrong over time) and the necessarily stouter design of the diesel engine itself, which had to have a beefy (usually heavy cast iron) block and so on to handle the stresses of very high compression.