I am giving you a simple roadmap that will help you learn automation in just 5–6 months. These are the same thing that I followed when I was learning Selenium:-
Learn JAVA:
There are plenty of youtube videos, but I am mentioning the Java Online Training & tutorial video that I pick up for me to learn Java.
Practise a lot as much you can.
Learn PYTHON:
You should never rely on one programming Language in your career at least you should at least know 3-4 at the core level.
Currently, Python is the new trend in the job market and Companies prefer Automation with Python over Java. Here is the link of the video tutorial which you can follow while learning Python.
Selenium:
After learning those languages you can start learning Selenium. I am mentioning the resource for that.
Learn to create an Automation Framework.
Source Code Control:
Learn Git Version Control System.
If you will follow this learning curve that I have mentioned with disciple I believe you can be good in Automation in 5–6 months. Becoming a master takes a lifetime.