A few questions come to mind. None is a judgement; I'm genuinely curious. Do you think that things could have turned out differently if you would have communicated more fully, or in a different way? Do you think it could get better going forward if each of you expressed yourselves better? How do you think you would react if you found out he was sleeping with someone else?
I don't know how much better everything could be expressed. We can't just pretend that every marriage is fixable to be some dreamy life partnership where everyone gets exactly what they want. Some of them are just mistakes that you couldn't have seen coming. Sometimes you just end up with someone who you don't get everything you need from and I don't think it's fair that we expect marriages to function like that. I don't want an affair. I just want to go get laid. I already get the emotional support that I need from my marriage. I don't get other things. I want those other things. If he was sleeping with someone else I would be so angry, but it wouldn't be because he slept with someone else. It would be because he slept with someone else instead of sleeping with me. It's not like he has this exceptionally huge sexual appetite that I'm not satisfying. So if he cheated on me, I would be mad at him for denying me sex while giving it to himself. I don't think he will cheat though aside from the inherent lack of sexual appetite. If I'm thinking about our kid and divorce, I know that he is, and he wouldn't want to weaken his case for the lion's share of custody by cheating and getting caught.
I know the feeling. I had an ex whom I wasn't always faithful to for similar reasons. She always told me she didn't know what was wrong, but that she just wasn't that interested. You can imagine how pissed I was when I found out she was banging everyone but me! Can't say I've ever been that mad about anything. In the end, I think everyone is interested in sex, but not everyone is interested in sex with you. It's personal, no matter what the other person says. My situation was a lot simpler, because it's easy to kick someone out when you're not married and lack children. Yours is much more complex. Best of luck.