Becoming a md/lawyer/dentist is a pretty sure thing. At least where I live (Canada) these professions are in demand. You can always move to smaller communities if needed.
I think the parent comment was pretty good advice.
I really feel very strongly that you should ONLY be a doctor, lawyer, or dentist if you genuinely like doctoring, lawyering, or dentistry. It ain't a get rich quick scheme.
The WORST you do as a doctor is about $120K/yr which is one of the best salaries you can make as a programmer.
Doctors don't become Google rich but if you are looking for a solid stable job that pays a lot it's still one of the best.
Law is different because there is no limit on the number of lawyers minted each year. Every year is a new record number of lawyers. A law school grad isn't guaranteed any job at all, even with a degree from a school like Yale. In contrast, doctors can literally kill people and keep their jobs.