Doing a spot of reading...
It all started with the O series, which you could get in petrol or diesel, and were virtually identical blocks.
Perkins took the O series and developed the Perkins Prima diesel from it (or it just became known as this, a little unclear) This was then further developed into the L series.
The O series was also developed into the M, then T series petrols with few block changes.
So, you have O-->PP-->L AND O-->M-->T meaning both engines have effectively the same development root.
As for the gearing, the longer diesel gearing would be a massive advantage, I wouldn't want to try and put 200+hp through the K series 1st gear, its massively too short to,be useful! If you've got the torque, you want lengthy gears or you're going to spend more time changing gear than accelerating.
I'm tempted to pick up a K turbo lump at the end of summer as a winter rebuild project, I hear they may fit with a minimum of wiggling with a V6 nose?
This is all quite correct. Pretty much all engines Rover used have roots back to the O series. The O was designed to replace the ageing B series. The O had a 5 bearing crank and an inlet and exhaust port for each cylinder. This was a massive improvement on the B series it replaced. I believe that the gearbox from the B would also fit the O although I've never tried it.
The PG1 gearbox has several gear ratio sets available, however they are there for fine tuning to match a particular torque output. The main difference between the L gearing and the K4 is in the final drive. The main gear cluster will work quite happily with either engine. The L series final drive is higher than the K4 to match the slower speed, higher torque of the diesel.