The diesel boat will generally get significantly better mpg. Exactly how much better will depend on the engines in question for each fuel and how heavily loaded they are at a typical cruising speed.
My own 38 foot gas boat burns ~5 gal/hr at 6.5 - 7 kts, ~30 gal/hr at ~17 kts. That's with mid 1980s engine tech, so newer gas engines would do a little better. Powered to run similar speeds with modern diesels, I'd expect the fuel burn at 17 kts to be closer to 20 gal/hr and the fuel burn at 6.5 - 7 kts to be in the range of 2 - 2.5 gal/hr.
Diesels don't lose efficiency nearly as badly as gas engines do when running lightly loaded, so for a boat that's powered for planing speeds, the gas vs diesel difference gets bigger as you go slower. For my boat, at planing speeds, the diesels would use 60 - 70% of the fuel the gas engines do. At low speeds where the engines are very lightly loaded, the diesels would be using 40 - 50% of the fuel the gas engines do.
Of course, depending on your intended usage and the boats in question, the choice isn't always as simple as fuel consumption. Sometimes a boat you like is only offered one way or the other (or one option is better powered than the other). And gas boats are typically cheaper to buy as well.