18 weeks to 6 or 8 years, but it does not matter
9 months to produce an infant is a long time compared to the initial growth rate of the embryo. At 4 weeks, the embryo is the size of a poppy seed (2 mm long), at 8 weeks, the size of a kidney bean (16 mm head to bottom). During that period, the human increased by at least a factor of 8. This is a growth rate of about 68% per week. At this rate, you are large newborn at 15 week and a full sized adult in under 18 weeks.
So, we have a reasonable lower bound of about 18 weeks and an upper bound of about 18 years. But can we find a better upper bound? Yes we can, Robert Wadlow was the tallest modern man that can be reliably documented. At age 6, he 5'7" and was already taller than his father at age 8. So 6-8 years seems like a better upper bound since people can grow that fast with too much human growth hormone.
Robert Wadlow had health problems and in fact died of medical complications of an autoimmune disease (possibly related to his HGH levels) at age 22. He was reportedly in good health until the final year of his life. His brain was certainly not mature at age 6 or 8, but lets assume that it could be close enough to be considered adult if he had a magical efficient training systems and nanotech to re-arrange brain structures as needed.
So 18 weeks to 6 years. Hypothetically speaking, after all of the needed advances in technology, including nano-tech what could we do?
The answer is simply unknown since we don't have the medical knowledge of the complications of accelerated growth in an artificial womb. Perhaps with nano-technology we could control physical growth, perform the necessary muscle and bone training, deal with the psychological and sociological training. Training the interactions between the brain and eyes, ears, hands, etc. Perhaps it is also possible to teach language, reading, writing, arithmetic, etc. in the womb.
There is a huge gulf between our current state of knowledge and that needed to perform all development in the womb. And there is very little incentive to acquire it.
Parents want to watch their children grow up, play, learn from their environment, etc. I can't image any parent I know desiring to replace this process with an artificial one.