Boyfriend doesn't want sex

Whenever I'm with my boyfriend, I always want sex. I even told him that I feel like I'm in the mood more than he is, and he just says he has a lot on his mind, or he doesn't feel like it. And he won't tell him what's on his mind or open up to me. I feel like he just has sex with me now, out of obligation. I also know his sexual past, and it seems like he was more into have sex with those girls, then with me. And it actually makes me feel bad. I only get to see him during the weekends, and I love spending time with him. I just don't know what to do, since I feel like he doesn't want me as much as I want him.