There is no answer to that. Some people might be able to do it straight away (or faster) with no run training at all. Others might train a long time but never be able to run a 9-1/2 min mile. I've been running for years (off and on), and my best mile time is around 10-1/2 mins, and I doubt I'll ever exceed that.
Not everyone has the potential for it, but plenty do. How long to train depends on many factors such as their current fitness level, how fast they are able to run when they begin training, the type of training program they use, etc.