My ex and I were in long distance situations a couple of times in our relationship. We saw each other every 4 to 6 months or so. So when we were physically together, I assumed that we would have sex. What I found for me was that expecting sex to happen just killed my desire and made me actually averse to sex. It stopped being spontaneous (hard to impossible when long distance) and more importantly, stopped being joyful and felt more like an obligation. Nothing kills a boner faster than feeling like 'I have to', or 'I should' or 'My partner will be disappointed if I don't'. Now, my ex did not put this expection on me - this was stuff in my head.
Perhaps something similar is going on for you? If so, talk to your partners about it - I did not handle my situation well at all in terms of communicating about it and that really negatively impacted our sex life.