Nothing to it. Just unbolt the old petrol engine and bolt in the new diesel. Fill the tank with diesel and drive off.
Modern cars are all designed to have interchangeable engines, so the engine mounts, exhaust, throttle, fuel pipes, filter head, glowplug wiring, relays, ignition key switch...