Yes you can. I put an engine from an 83 300SD into my 79 240D. Kept my
original manual tranny.
Depends on if you are very handy with the wrenches and how much you
want to keep the car. I had the knowhow to do the engine swap, but my
engine stand was occupied by another project. Had mechanic do it.
Cost in 2001, including rebuilding tranny and converting AC to 134a was
about US $3k.