A ex is in the way of other relationships

Ive been single for about 2 years and I've tried to have other boyfriends but I still continue to think about my ex? I don't know why but he is just always on my mind and it's been 2 years. Other guys have wanted to "date" me but I feel held back because I still like my ex. I feel like I should not have feelings for anyone else before I continue with other relationships. How should I get over this?