You have been friend zoned, meaning you have romantic feelings about him and he does not return these feelings. He has specifically told you that you can still be friends and he likes another girl. You need to honor his decision. You can't make someone like you. None of us can. I know that hurts. Although it may be logical that you and he should be together, your crush is just not feeling it. I'm sorry. I've been there, too.
The best thing to do is to work on getting over your crush. Distance yourself from him for now. Definitely stop waiting for him after school and chat on social media and in school only on occasion, like you do with other guys who are strictly friends. Over time, it'll become easier as your feelings for him fade.