This view of the Prophet (s.a.w.) having "long" hair is not absolutely unanimously agreed upon. There are views that the hair should not be longer than the level of the earlobe.
For argument sake, if we were to confirm the view that the Prophet (s.a.w.) or members of the Ahlul Bayt (a.s.) had long hair, then do we have any narrations where the Ma'sumeen have said it is recommended for other?
Did the Prophet (s.a.w.) call it a sunnah, and encourage others to grow their hair? Has it become a common practice among religious men, throughout history, to grow their hair long?
The answer to these questions is all NO.
The view of our esteemed jurists, like Ayatullah al-Udhma Seyid Sistani says that if growing your hair equates to having resemblance of women, then it is haram.
Once case is you yourself want to look like a female, by growing your hair, which is haram. Another case is the society and community you are a part of sees long hair only being for women, in which case you must not go against the 'urf.
If you are also being censured and discouraged by your elders and your teachers, then by no means should you be disobeying them. We must always remember to respect our elders and our teachers who are encouraging us to do good things and right things, even though we might have a different perspective.
A mu'min must present himself in public in the best way possible, with signs of Iman and Taqwa resonating from his appearance and how he conducts himself. This is more important than fashion or hair or anything else.
On the other side, if, in the case that there is no resemblance of a female, and the 'urf around you see it to be absolutely fine, and your parents/elders/teachers also see it to be fine, then yes, you can grow your hair.
We also know that taking care of your hair is a sunnah, by combing it, oiling it, cleaning it, etc.
And Allah knows best.