As someone who has been interested in programming and computers all his life and has tried learning a few programming languages:
1- Your mental issues (attention span, depression, OCD, etc.) are going to be a problem. You think you can overcome them but it's pretty hard. Every SINGLE time I have tried to get better at a programming language I end up quitting partly because my OCD and my mood changes stop me from focusing on one thing for a long time.
2- You simply can't get good at it without going to a professional work environment. I don't care how many people claim they are self-taught, they are all lying. You can teach yourself the basics, you can even teach yourself medium to advanced stuff but you will never know what to do when shit gets real. You will never know what the "industry standard" solution to problems are. So you end up reinventing the wheel, or just quitting because you hit a wall.
It's like knowing everything there is to know about math and theoretical physics and then trying to build a space rocket. Theoretically all there is to it is just math and theoretical physics but can you build a space rocket? Of course not, because there's been decades of trials and errors and people have found standard solutions to problems, in short experience, which you lack.
It's the same with programming. You can read every book there is and know all the details about a language but if you try to write something real and big you're gonna find yourself lost. Trust me it has happened to me.
Aside from that you'll learn 10 times more when working somewhere compared to what you'll learn by yourself.
So if you're thinking of self-taught as staying in your room all day coding, and then after two years emerging as a professional coder then it's not going to happen.
But you can totally teach yourself the basics and medium stuff and become comfortable with a language, then start going to a professional environment to see how the real job is actually done and then after a few months or few years you can maybe become a freelancer, or stay employed if you prefer. This is the right way to do it.
Regarding how long it takes, well if you don't have any previous experience it might feel uncomfortable at first specially since we're not young anymore to be honest. So I don't know, maybe a year if you're genuinely interested and keep practicing. But like I said you have to go somewhere and actually work with other people to become good. Unless you're doing small projects which I don't think will make much money.