Is this the Atlas unit or an Atlas/Kato unit?
If it is the Atlas: I have done this swap multiple times. It is a direct swap. No modification necessary. I have done this swap from what I am aware around 8 or 9 times, and only had a problem once, where the shell was loose. Ended up selling that one before I got the chance to look at it in detail, but I assume it was something I did, rather than the shell itself.
For the Atlas/Kato: not compatible without extreme modification. The handrails and porch are part of the frame and are metal. The shell itself comes off, but since it has no walkway, is not compatible with the newer mechanism, unless you put the newer walkway from the original shell under it. I have not tried this. The Atlas/Kato mechanism is also not TCS CN compatible. The unit I had was a GP38, not a GP40, so I am unsure if they were offered as GP40s, but most likely yes.