Do you know if you are actually pregnant? Have you taken a test? If so, I'd recommend finding someone you can talk to about this situation, even if you can't talk to your boyfriend (a friend, a family member you are close to like a sister or cousin, or your doctor). If you haven't taken a pregnancy test, it might be a good thing to take one just so you know for sure. You can get a cheap one at the store or for free at a local clinic.
But at the expense of sounding harsh, I'm assuming your boyfriend is also fairly young and if so, it's very unlikely he would have gone to the trouble of actually having the tests done to determine if he is fertile or not. He might just be assuming this for some reason, or he might just be telling you that because he doesn't want to use condoms (he wouldn't be the first guy to try this trick, trust me!). Regardless of whether you are pregnant or not, it would be a good thing to have a conversation about being safer, including using condoms and getting yourself on birth control if you guys are going to continue to be together. Even if he is infertile, not using condoms means you are leaving yourself open to getting an STD from him, and I'm sure you don't want to have to go through that. If he's telling you he's infertile so you'll have unprotected sex with him, I'm sure you aren't the first person he's tried that with.
2 months as I'm sure you are realizing now is a really short time to be with someone and find out you're going to be stuck together for life, which you will be in one way or another if you have a child. But it's also all it takes for you to wind up pregnant or with a disease you can't get rid of. So it's really important that you speak up for yourself and protect yourself from now on. If he cares about you, he'll want to do that too. And if he can't respect that, don't waste your time on him.
I hope this doesn't sound too harsh, but I wish someone had said that to me when I was younger. Hope it turns out okay for you!