Why replace?
Those things will last forever unless you abuse them or don't maintain them. I go by the old saying "if it ain't broke, don't fix it."I talked to the Yanmar people a few years back before we went cruising. I wanted them to check out my 3QM30 to make sure it was fine.He asked if it was hard starting. "No". He asked if it burned any oil. "No". He said that unless we'd really overheated it, or it had obvious problems, he wouldn't even recommend looking into it. He said they'd torn down many with lots of hours, many still hadn't worn the cross hatch off the cylinders. They're pretty tough, and even if you have a problem, you can fix most anything cheaper than buying new.One problem you'll have if you replace the motor is the transmission. Yanmar doesn't use a standard interface and you'll have to do some machine work, or if the new motor comes with a transmission, you'll have a coupler to buy, maybe a propshaft, and probably a prop. I had to replace my Yanmar transmission with a Hurth. Cost $1000 for the machine work to make it fit, plus modifying all the mounts.What I would strongly recommend you do is change the transmission oil. Few people do, and it's not much work or expense. It cost me about $3000 for not doing it, plus being stuck for a week while I replaced mine.