Have a friend who put a used 4-cyl MB diesel in his 40-ft trimaran and it worked out beautifully. Only problem was the hardest part to get to on his installation was the starter. Guess what gave him fits?
Anyway, a rebuilt engine will take some break in but stationary diesels are broken in running at constant speeds and I'm told this is preferable to variable rpms. A diesel of any make, certainly one of the bullet-proof
240Ds, should work fine. I'd have the compression checked both "wet" and "dry". A mechanic will know how to do this on your engine.
On gasoline engines you remove all of the spark plugs and check the compression of each cylinder. On diesels you remove either the injectors or glow plugs. After each cylinder has been checked and the psi written down, do the same again. However, this time put two or three "squirts" of oil in each cylinder and see if the compression increases measurably. Be sure to inject oil in the individual cylinder you're getting ready to check, not all of them at the same time. Doing so will force a lot of the oil out the injector port.
The reason you do this is that the oil will temporarily seal any leaking rings and sometimes leaking valves. However, in a rebuild any compression loss will almost certainly be rings.
As far as engine oil is concerned don't use 20-50 unless it is recommended for diesels. This is normally reserved for engines with a lot of wear. The preferred oil is 15-40 such as that offered by Chevron. Although the viscosity is slightly less when the engine is at operating temperature, it is designed for more stressful conditions, such as a diesel.
Good luck!