I switched last year from an '04 Chevy 6.0 Gasser to a '13 Ford 6.7 diesel. Pulling the same trailer, I went from an average of 8.5 mpg to around 11.8 mpg. Based on my local fuel prices, this is about 36.4 cents per mile for gas, and 31.3 cents per mile for diesel.
Then, on the newer diesels, you must purchase Diesel Exhaust Fluid (DEF). This runs me about $28.00 to fill up my five gallon tank. However, I can go approximately 5500 miles on five gallons. So this adds another 0.5 cents per mile.
However, the diesel engine requires quite a bit more oil than a gas engine. So oil changes are more expensive. In my case, I purchased a lifetime oil change plan from my dealer that cost the same whether it was a gas or diesel truck. So this did not affect my decision
For me, the differences in fuel economy were not worth paying the many thousands of dollars more for a diesel engine. The reason I purchased the diesel was two-fold. First, the extra horsepower and torque are worth every penny when you're climbing steep mountains while pulling a heavy load. With the diesel I can maintain a reasonable speed on the steepest grades. The second reason for the diesel purchase is the average life expectancy of the engine. It's not unreasonable to get 300K or more miles on a diesel without major repairs. I retired late last year, and plan on doing a lot of traveling. I'll be putting on a lot of miles, and the diesel will give me confidence to keep the truck longer.