Got it.
I had a few years back a G20 SF that I retrofitted with Meprolite adjustable tritium sights and a 6" KKM barrel. I liked that rig! I got rid of it years ago but kept the KKM barrel. I wonder if it would work in the G40? 😎
With 6" barrel, I'd think it would.
DF
Caution -
It'll physically fit, but if it was a G20sf barrel it probably has the gen 3 guide rod cut, which is smaller than what the G40 needs. The difference is just a radius cut in front of the locking lugs and is the spot where the guide rod sits; the head of gen 4 guide rods is bigger than the gen 3 guide rods.
Because of that, gen 4 barrels are reverse compatible with gen 3 guns, but not the other way around. You can cause some problems using that gen 3 barrel in a gen 4.
However, if you're pretty handy with tools or know a local friendly machinist, enlarging that radius is possible.