The first question to ask is 'Why are they not sharing knowledge?"
If it is for job security, then address that issue head on. If it is a senior person with a top salary they may have a very legitimate fear that the company would lay them off and replace them with a cheaper, more junior person or even outsource their job overseas. We all know of lots of such companies, so this can be a real fear. One effective way to deal with this is to say "If you will agree to share your knowledge we will give you a guaranteed employment contract for X years." Of course if your goal is to outsource the job as soon as you pick their brain then perhaps they have simply seen through your strategy....
Another possibility could be that they would be happy to share but they are introverted, don't like to speak in front of groups, don't like to write etc. In this case hire a person who is an excellent writer and assign that new person as this persons assistant. Their job would be to learn what the person knows, write it down and communicate it to the organization.
Please remember that generally a person becomes a programmer because they want to program. If their first love is teaching they would be an educator, not a programmer. If their first love was running training seminars, they would be running training classes at a consulting firm. When you want someone to do something outside of their comfort zone the first thought should be "how can I help them?" The second thought should be "How can I make it worth their while?"
Consider what would happen if your department scheduled a one week training retreat in Hawaii and you announced that anyone willing to give a half day training session could go for free. Further everyone would vote on which sessions were the most useful and the person with the most votes would get a $10,000 bonus and the runner up would get $5,000. DOn't you think you would get lots of people working extremely hard to deliver sessions where they share their knowledge?