If someone feels threatened by your intelligence, it's often because they realize they can no longer take advantage of you. Your growth ends their opportunity to use you as a stepping stone.
Not everyone is meant to stay in your life forever. Accept that some people are only part of your journey, and don't be shocked when it's time for them to leave.