The best would be to convert some aircraft already in the inventory for ASW missions. The A400M seems to fit best ASW mission. The A330MRTT is flying to high just like the P-8 Poseidon to make good use of MAD sensors. The center line refueling hose could be replaced by MAD. Torpedoes with wings could be thrown out of the rear ramp by a chute. The sonar buoys could be thrown out of a redesigned side door thought for paratroopers.
Germany still operates used P-3 Orion.