First of all, divorce is a very hard thing and children sometimes get caught in the middle. They hear what their father or mother is telling him, depending on the situation. They get confused and they don't know what to say. Sometimes they begin to align with a parent and it sounds like that's what's happening in your case, is that your son is aligning with your ex-husband.
Now, I don't know what the visitation rights are or what your opportunity is to interact with your son, but what I do know is that as long as you are connecting in a way that your child feels heard and listened to, you're more likely to have a positive outcome with your son long-term.
Right now there's probably a lot of confusion. In some situations, blaming you because that may be what he's hearing from his father. That it's your fault. With that being said, a 15-year-old boy might have some curiosity, wondering why this happened. If the 15-year-old has been talking with your ex-husband, then he's probably getting your ex-husband's side.
In a situation like this, what I would recommend you do is when you have an opportunity to talk with your son, it's important that you are listening and inquisitive. Listening to what your child is talking about. If your child's treating you poorly, it's going to be important to step back and ask a question.
I wonder why my child's treating me poorly? I wonder what's triggering this response in my child? I don't know what that is but my guess is that he's been told there's something about you. At some point you might say something like this "Hey son, I'm wondering, it feels like you're mad at me, that I've done something wrong. I'm curious about if that's accurate, because the way that you're talking to me, the way that you treat me, it feels like you're really, really mad at me?" Now, that gives your child a chance to open up. It may be that you're going to have to listen to what your child's frustrations are and what their concerns are and might be accused of some things that you have no idea.
Your ex-husband has said that you don't want anything to do with your son. So, you're going to also want to deal directly with that. Now, how would you do that? My suggestion is in a conversation say, "I really appreciate spending time with you and I am grateful for the times that we can have together."
I don't know how you heard that his father told him. Now let's say that he told you that. Well, your natural response might be, "well I never said that." But then your child is stuck between what your husband said and what you said or what you feel. One way to deal directly with that is to say, if your son has told you that, "I understand that you've been told that I don't want anything to do with you. Can I tell you how I really feel, and before I do that, do you think that's true? Do you think, I don't want to spend time with you?" What you're doing is you're trying to get your child to open up about how they're they're experiencing this.
A really important approach, rather than just going in and telling your child, "well, I do want to spend time with you and I do want something to do with you," let your child share with you what they're thinking and that will be more helpful long-term for you and for your child, because it gives them a chance to give a voice or an expression. "Mom, I do feel that way," or "I don't believe that's true." If your child says, "I don't believe that's true", it's validating it. "I do want to spend time with you, it has been a hard time going through this divorce and if I've done something that has pushed you away or made you feel like I don't care, I am sorry because I want a relationship with you."
My final point is this. It's a long process being a parent of a child, as you go through divorce. If you're consistent in being present, being kind, but also having boundaries, your child's most likely to respond in a positive way.
Thank you for taking time to ask your question here at Parent Guidance, may you and your son be blessed, as you go through this difficult time.