First thing is to be sure you've found the diesel leak and fixed it, or you're wasting your time. Even a tiny amount of fuel weeping from one of your fuel line fittings or connections will eventually stink up the whole boat. If you can wipe a paper towel on one of the fuel line connections and it smells like diesel, you have a problem that needs to be addressed. After you're absolutely sure you have no leaks, then as mentioned above you can work Pureayre into your foam to neutralize the odor. It comes in several different varieties, and if you want, you can pay a boat load of money and buy the marine version, but I've found the cheapest way to buy it is to get it from pet stores, where it's packaged for treating pet areas and odors. It's the same stuff, they just put it in a green and white bottle that says Pet instead of a blue and white one that says Marine, and sell it for much less.
You can go the new foam route, but it'll also end up smelling like diesel in a few months if you have an unresolved leak somewhere, even one so tiny it just shows as a damp spot at a washer.