The M104 is an inline six. Most do develop a headgasket leak at some point. It is an external oil leak and not an engine stopping malady. Cost at a dealer for replacement is about $1000. The fix seems to be a permanent one. The engine wiring harness is a concern also in 1995-96. I replaced mine myself in just a couple of hours, it is not a difficult thing. The part was about $500. I don't think any of that would dissaude me from buying one, in fact I have had a 1995 G320 for four years now, very nice truck. I can't think of an MB model that doesn't have some shortcoming, but the M104's have now been covered. The only other G specific items to be concerned about are the front axle wheel bearing service every 60-70k miles and the possibility of driveline vibrations but these are much more common in the old style G's. Driveshafts to fix the vibe are about $1000 each, there are three

The front axle service is $4-700 for parts and a good 10hrs labor.
Otherwise these trucks are dang tough. Since moving to Colorado I have been using mine off road 4-5 times a week. The remain very comfortable and reliable just as a Benz should be