i think it would be best if you just went up to him and said whats on your mind.. like I know this was while back but i wanted to apologize for acted back then i was confused cuz we were really good friends and i didnt know what to say and ive been thinking a lot about things for a long time and i know for sure that i really want us to be friends again...
he probably felt rejected and nobody likes feeling that way just explain to him that ur sorry and that u understand if he still doesn't talk to you anymore but you wanted to let him know before he moved (wanted to be on good terms before hes gone...)
hope that helps good luck