Railroads are neither being dishonest nor trying to make themselves sound good. Those ads are aimed at reminding knowledgeable business people as to how efficient railroads are when compared to cars, trucks, and highways. So you have to understand some mathematics and you have to know something about how accountants calculate the cost of doing business.
Transportation systems, including railroads, always calculate their consumption of fuel and other costs in terms of a unit called a "ton-mile," which means the business of moving one ton of payload one mile over the surface of the earth.
So railroad freight services move freight at the rate of about 430 ton-miles per gallon of diesel fuel. That's what the advertisement actually says, if you pay attention.
When you realize that a freight train may weigh 8,600 tons, for example, then you are talking about using 20 gallons of fuel to move the whole train one mile. That's a realistic figure, and it represents much greater efficiency than moving the same freight a long distance by truck.
Trucks get about 6 ot 8 ton-miles per gallon over the open road, which makes the train about 50 times as fuel efficient as a truck. The only thing that has made the trucking industry commercially viable has been political influence.
You just have to understand the math and the business proposition.