Realistically, how many years are we away from colonizing:
Realistically is the key problem here.
We could do it right now. There just isn't enough money or anticipated benefit to science to justify it.
As the Man pointed out, the trick is motivation.
To get people to colonize, there has to be a resource crunch, to drive people to the lengths required. From a "when WILL we do it" standpoint (as opposed to a "when CAN we do it" view) I'd say any space colonization is very far off, barring special circumstances.
Food and water crunches are the most likely resource competition the future will bring. Neither of these is really helped by the Moon or Mars. You're far more likely to see something like a floating or underwater city with desalination plants and hydroponics labs to address these needs.
A land crunch is unlikely because food and water will limit population first. But if you somehow solve those limits, the population could probably double every 60 years. So maybe 120 years is the point at which overcrowding drives moon colonization over oceanic colonies.
Other resources would need to be something valuable to export. As far as I know, the Moon is pretty much silicate (worthless) all the way down. Mars could presumably have some special mineral deposits, but to overcome shipping costs it'd have to be far more valuable than gold or diamonds. It'd need to be something useful that we have either run out of, or don't have and can't make. Like Unobtanium rare.
The final driving factor is something happening on Earth to reduce what we have. Global climate change, volcanic eruption, meteor strike, nuclear fallout, take your pick. Something to make those that can afford it take flight to live in peace on the Moon. As the Man said, it can be done now. So, whenever you think one of these is likely (tomorrow to 1,000 years).