To directly answer you question of "how long does it take" is there isn't a good definitive answer. Everyone is unique and it depends largely on your practice routine and determination.
I don't recall now how long it took me to be able to play all of the open chords. I can change most of them smoothly but there are still a couple that trip me up. But I'm much better now than when I started and you are too!
Keep practicing and keep reaching out when you get stuck!
Jarrod, 58
Started guitar at 45, put it down at 51, revived it at 57.
2nd time GT member.
Learned 100% online (plus 15 private lessons).
Not nearly as far along as I should be, but I'm still chasing it!