Diesel is less fuel efficient than regular gasoline except when you measure by volume. It gets fewer miles per unit of energy in the fuel.
I suspect that modern (last five years) turbocharged gasoline engines are probably approaching diesel thermal efficiency, but I don't think that it's correct to say that they generally surpass it. The gasoline Ford EcoBoost is 33% thermally efficient while a BMW N47 turbo-diesel is 42% thermally efficient, as an example [2].
[1] https://afdc.energy.gov/fuels/properties [2] https://en.wikipedia.org/wiki/Brake-specific_fuel_consumptio...
The focus has more recently shifted to reducing overall emissions of CO2 and other harmful gases and particulates, which makes diesel much less appealing.
People that buy cars almost exclusively care about cost of fuel to move between A and B.