Can you source that? Diesel is only 13% more energy dense than gasoline [1] so the difference between the two fuels isn't huge.
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...