I started to shun green veg and other unpleasant food at about 2.5. I reckon it's a simple developmental thing, in that you become old enough to know what's nasty taste/texture-wise and how to avoid it (rather than indiscriminately putting things in your mouth and swallowing whatever stays there long enough, as babies do). It certainly wasn't a learned behaviour, as the rest of my family were all happy to eat all sorts of things, and I didn't really have any exposure to anyone else (certainly not in a food context) until I started school aged 5 - by which point attempts to make me eat Not Food would ultimately be futile[1]. *shrug*
[1] I was, as a rule, quite happy to starve until such a time as Food was available. But parents and other adults had Ideas and delicate egos, which meant that all sorts of tactics - some of which I'd consider to be abusive - were attempted on a regular basis. With hindsight, I'd suggest that eating disorders are far more harmful than a lack of vegetables[2], and if you're force-feeding your child with things that make them vomit, you're probably doing it wrong.
[2] Like most supertasters, I eschew fatty foods, carbonated drinks and alcohol, so it's a bit swings-and-roundabouts in health terms.