There simply is no way to answer this in a generic manner. It depends on aptitude, dedication, and time that you are willing to spend on studying. It could range from 6 months to 2 years, with most probably closer to the 2 years.
But what does a “good developer” mean? We all have varying definitions. In my estimate how long it may take you to reach a junior developer level where you will be capable of doing basic tasks and on the border of employability.
The good news is that with the Internet many other bigger obstacles have now been removed and resources are freely available to all.
A good developer never stops learning. I have been developing for over 35 years and I still am continually learning.