Of course, there is no simple answer to this question.
The bad news: You won’t wake up one morning and have perfect ears!
The good news: Every day of ear training practice contributes to your ability: you’ll be continually improving and seeing benefits as long as you’re training.
How long… to do what? From where?
How long it takes to achieve your goal depends primarily on what you want to achieve. Do you want to play by ear when jamming with your band? Do you want to instantly recognise chord types? Is it perfecting your rhythm and ability to keep a beat which motivates you?
The other key factor is