The reason the Lancaster was considered as a vehicle for the atomic bomb was that it was originally thought that a plutonium-fuelled bomb could use a similar gun-type mechanism to that used for the uranium-fuelled Little Boy design (used for the Hiroshima bomb).
Plutonium 239, being more prone to spontaneous fission than Uranium 235, required a higher velocity for the projectile in a gun-type weapon, so that the two sub-critical masses formed by projectile and target would come together and attain super-criticality before they had time to start a pre-detonation 'fizzle'. This was attained by lengthening the barrel. The resulting weapon (called Thin Man) could, at the time, only be accommodated in the Lancaster's lengthy bomb bay. Contemporary American aircraft, like the B-17 had a pair of shorter bays, though the up-coming B-29 could be modified to carry it.
Further research revealed that manufacturing impurities in the Pu-239 made it even more prone to pre-detonation than had been supposed and the Thin Man would have to be impossibly long to work. Efforts were therefore concentrated on the more complicated, but more efficient, and safer*, Fat Man implosion bomb.
More here: https://en.wikipedia.org/wiki/Thin_Man_(nuclear_bomb)
*The idea of a safe nuclear weapon seems a little strange, but the gun-type design could be accidentally detonated from a single failure point. Getting the implosion bomb to work at all was sufficiently difficult that it had a degree of intrinsic safety to work with.