By my understanding - there are two common wrong ways of conceptualising Christianity: one is the traditional, the other liberal.
The traditional is that Christianity is primarily a system of morality; and salvation (i.e. resurrection into Heaven) is a reward for a 100% effort to live in accordance with a moral system (repenting all failures to do so).
Traditionalists believe that to advocate and/or not to repent, sexual behaviour outside the code is at least a self-exclusion from Heaven, or (more traditionally) an absolute barrier to acceptance in Heaven.
The liberal view is that Christianity is a gift of salvation from Christ to all; and has essentially nothing to do with morality, especially not with sexual wishes, expressions and behaviours.
Nowadays; the traditional way, in practice, puts a system of sexual morality at the heart of Christian living; while the liberal believes that sexual morality is a matter of worldly expedience merely - an accidental (non essential) product of individual disposition and social circumstance.
Liberals believe that anybody who wants it can dwell in Heaven post-mortem - and sexual behaviour is of near-zero significance; except that those who falsely-insist sex is primary are excluded from Heaven; on the basis that if the sexual code adherents were included, then Heaven would not be Heaven.
I regard both as wrong. Essentially, Christianity is about mortality, not morality; but morality is linked with resurrection into Heaven. I need to explain this, because it is not obvious to most people.
Where does Christian morality come-from? I believe it comes, ultimately, from the condition of Heaven; which is 'organised' (spontaneously, naturally) on the principle of loving creation.
Heaven is a matter of immortal, resurrected persons living (loving, creating) in families*.
Yes, Heaven is for all of those who want it; but - because Heaven is 'a family affair' - sexual morality is deeply linked with the wanting of Heaven. Because sexual morality is about families.
Those who - in mortal life (unless they repent) - reject the Heavenly-reality of marriage and family Do Not Want Heaven; and therefore will not have it.
Any explicit this-worldly System or legal code of morality - including sexual morality - will inevitably be deficient; since all verbal expressions are both incomplete and distorted. Nonetheless, there is, in actually-existing reality, a morality of Heaven.
The morality of Heaven is based on love, and love is bound-up with creation - the primary (but not only) form of creation is generation, reproduction, i.e. family.
The reality is that we Just Are God's Children and spiritual siblings; Jesus is our brother. It is ultimately all a matter of relations and relationships.
This mortal life is a domain of learning, therefore not intended as a place of perfection; mortal living is temporary, intrinsically corrupted and corrupting; and our salvation is to become saved-from this intrinsic sin. Sin is the condition of mortality. To be saved from sin is to want what Heaven offers - immortal resurrection into the condition of Heaven.
Those who do not want resurrection, and/or who do not want to remain conscious and free agent selves, and/or those who do not want family - all such do not want Heaven; and will not have it.
Why do people reject family? Look around, it isn't uncommon...
Some expediently reject their actual mortal family, perhaps because their earthly family is unloving - some are rejected-by their families; but that is not significant unless they reject the ideal of family.
Many who have utterly miserable and dread-full actual mortal families will - and perhaps with greater intensity - wish for a life of ideal, immortal, uncorrupted family life. They will yearn for the ideality of Heaven because the actuality of earth makes them aware of their need and desire for the truth of family.
Such will be saved, and will find their way to Heaven; because that is precisely what Jesus made possible.
But it seems that there are many (especially nowadays, in the West) who reject family - not in practice but in principle; not specifically but generally.
Often because the Heavenly condition of loving creation in familial relationships (including Men and extending to the divine - the divine being Men in exalted condition) is something they reject as an ideal.
Such may want to be fully independent agents, without any family ties; perhaps because family ties block what they most want - which may be sexual, or may be related to other gratifications from status, power or whatever. A prime motivator of anything other-than the family ideal, means they do not want what Jesus offers.
There are those who reject the ideal of divine Heavenly family - and therefore in this mortal life they quite spontaneously seek other primary goals; and advocate other ideals...
Some do not want resurrection but prefer to remain spirits. Some do not want to become more divine, but are satisfied with them-selves as they are. Some do not want eternal life of any kind. Some hope for an end to their consciousness - they are tormented by self-awareness. Some want eternal happiness, but do not want eternal and loving relationships. Some want to use people, not love people.
None of these want Heaven; and (since God loves us) they will not have Heaven forced-upon them; theirs is some other destiny.
So, in an ultimate sense, the link between salvation and mortality is real because of our motivation and our ideals.
Those who are motivated to accept Jesus Christ's gift of Heavenly life will - quite naturally and spontaneously, as a consequence of this motivation - have and express and advocate the ideals of Heavenly life during their mortal lives... albeit that ideal will always be modified and impaired by mortal constraints of human limitations in understanding and corruption.
After all, salvation to eternal life is salvation-from these mortal constraints. Salvation is necessarily on the other side of 'biological death'; so there is zero possibility of attaining the ideal in this mortal life.
But not-to-have the ideal is not-to-get the ideal.
Therefore, actual earthly morality is inextricably-linked with immortal Heavenly life.
In other language: ultimately and primarily, sin is the condition of mortality, not morality; and morality is necessarily a part of Heavenly immortality.
Thus Heavenly immortality is attainable only via the motivations of mortal morality.
*Note: It might be asked where this idea of Heaven organised in families comes from? Three possible, staged, answers are that 1. The idea is to be found in the Fourth Gospel. 2. This is confirmed and amplifed by the Mormon Restoration. And 3. that anyone who has this idea may have it confirmed by divine revelation and direct intuition.