In my book, anything that is not an enthusiastic yes is a no. That includes remaining silent or freezing during sex. A caring, compassionate partner would obviously notice something was off and should have asked you about it before proceeding. Your boyfriend sounds selfish and I think what he did constitutes sexual assault. I know that's hard to hear. It's hard to deal with, and I am so sorry you had to go through it.
It's not surprising that your relationship with sex is complicated if you are dealing with the trauma of sexual assault(s). I want to tell you, though, that your experience of sex thus far is NOT how healthy sex should be. Sex should not be painful. If sex is painful you should always stop. It's an indicator that you may not be lubricated enough or of some condition, possibly like vaginismus. It could cause micro abrasions (small tears) in the vaginal tissue and that leaves you not only uncomfortable but prone to infection. If and when you are ready to have sex again (hopefully with someone other than your boyfriend, because you should honestly dump him), I would try using generous amounts of a water-based lubricant. If sex is still painful, see your doctor.
My hope is that, when you feel ready to have sex again, it's with someone who cares about you, not take advantage of your struggle to say no. Remember, it doesn't matter if you've enthusiastically consented before; consent is required each and every time physical intimacy occurs. Physical intimacy, up to and including sex, should be pleasurable for everyone involved. It should be fun. It should be a means of connection, not something to sit there and endure. You deserve better than that.
If you haven't already I would talk to therapist about this, should you be able to afford one. There are also support groups in some areas and resources online, like here on TeenHelp. You deserve compassionate care and to be able to get through this.
PM me if you need to talk about anything. I'm here for you.