YES, at least in some forms, because both were used from the factory.
I'm not sure how many engine bases MAY have been offered.
The PTO end of the crankshaft needs to be 1-1/8".
There is a difference in the "thickness" of the flywheel between the two engines, which necessitated DEERE to use two different-length center driveshaft sections. (IIRC, the shaft for the P218 is shorter.)
Neither center section is available from DEERE anymore, but can be found used on Fleabay and other places, or it would be possible to re-work the old one.