But at least in some of the cases I know, the difference in productivity is based on a couple of extra decades of intensive experience (fanatic code-all-day experience) and does not get narrowed down significantly by studying new techniques.
I agree these are the outliers, though.
There is, however, a massive (orders of magnitude) difference on impact that the better programmers have. And that largely comes with being familiar with high-leverage development practices, being willing to apply them, and being alert to opportunities where a process can generalize to a large scale and investments in automation are worth it. So for example, one programmer might spend a couple hours tracking down a bug, while another programmer spends a week improving the compiler's diagnostics and then a couple days writing a script that applies that and automatically fixes several hundred occurrences of the bug across the codebase. One programmer might spend a month refactoring 30 or so source files, while another programmer spends that month writing a script that fixes 5000 source files. One programmer might waste 6 years of his life writing Web 2.0 startups that nobody uses, while another might spend 6 years of his life inventing Google.
These are all teachable skills, but they can take a while to teach, particularly the ones that rely upon judgment.
However, a team's productivity can be made N times greater if said adopts a coherent process, including education to fill in the gaps of "unproductive" programmers.
It is certainly true that a certain percentage of unproductive programmers would rather quit than upgrade themselves. I've worked with them. But a management approach of demanding a willingness to learn will give you an environment 100x more pleasant than a management approach of shouting "we want A-players". And said approach might indeed improve the total productivity of the team.