I highly disagree with what your teacher said.When I started my french learning, one teacher told me it is impossible to do in anything less than 2 years for a new learner with no French background. But I think it is doable in 9-12 months, depending on the efforts. I don't want to discourage others. Ofcourse learnings new language and getting to an advanced level is not easy. But it is not unachievable either.
I do believe someone might need to study during 2-3 years to achieve a B2 if they're studying with very old methodologies, such as the classic 2-times-a-week-language-course that many of us grew up attending. This concept is dead nowadays. I didn't learn English that way, and never even thought about that when French became a need for immigration.
Nowadays with so many youtube channels, access to millions of articles, google translator, deepL, even softwares that can correct your text and point grammar errors (based on the context of the sentences) such as Reverso, I can totally see someone going from 0 to B2 in less than 6 months of INTENSE studying (at least 4-5 hours a day).
That's not my case, I've been studying around 90-120 minutes a day (but consuming little snippets of french here and there throughout the day, and checking google translator 40-50x a day, literally). Right now, I'm a solid B1 speaker (having started on January/2020). Totally foresee a B2 by late August (fingers crossed!).