I've found what JHanson said is true.
When comparing 3/4 or 1-ton trucks, the best mileage isn't always the smallest or least horsepower engine. I used to be very active on a full size truck forum and over years of participating in mileage discussions it became clear that a big gas engine usually got poorer fuel economy most of the time (empty), but when hooked up to a trailer or hauling a heavier load in the bed, the smaller gas engines had to work much harder and got mileage that was worse than the larger gas engine. Based on owners that participated in mileage surveys, my truck gets better mileage than a 5.4L V8 in the same truck when hauling.
I also purchased a 6.2L V8 gas truck for work. Same thing. My 6.8L V10 engine gets better mileage when hooked up to a trailer or with a camper. I keep my camper on the truck year-round. I think the 6.8L V10 truck is about perfect for that, and I'm happy I don't have a truck with a smaller engine, or V8. If I didn't have the camper in the bed of the truck very often, or just when I was going on a trip, it might be different.
Also, to remember is gearing. Some trucks have very high gearing, for mileage. Other trucks are equipped with much lower gearing, which means more torque at the rear wheels. Yes, some gas trucks have more torque at the rear wheels than diesel trucks, just based on gearing, but usually mileage suffers. You'll usually find diesel trucks to have higher gearing, as the diesel engine makes enough torque to compensate, and then get much better mileage on the highway. A gas truck can be had with the higher gears, but then lacks the torque at the rear wheels. Although mileage will be better with the higher gears, it begins to suffer when the loads get heavier and the lack of torque requires the truck to work harder (operate at a less efficient RPM).