In a nutshell, from 1 to 4 month, I am talking here about practice, otherwise you can skim it in a couple of days.
The duration depends on your background and expertise. The main problem of ROS in my point of view is its multidisciplinary nature, you have to conquer different topics first to gain a withstanding background to start your way.
basically you have to conquer these fields first
Programming using CPP “must” and python “optional”: The compilation process- XML scripts-header files -binary file generation, etc.
Robotics and mechantronics: rigid body mechanics- sensors - using arduino and raspberry pi will boost your performance-robotic arms-mobile robots, etc.
Getting familiar with basic Linux environment and commands
Based on your level in these topics you can determine how long will it take.
If you enrolled in a well-designed course your learning time will decrease dramatically instead of being overwhelmed and off schedule.