The usual understanding of Christians is that sin is moral transgression against God's law; and that this leads to the just punishment of being excluded-from Heaven and sent instead to Hell.
But a close reading of the Fourth Gospel paints a very different picture of what Jesus taught about sin.
In the Fourth Gospel - sin means death, primarily.
Death here means to die physically, biologically, death of the body - and thereby to lose our-selves - without a living body we would cease to be our-selves.
This seems to have referred to the condition of sheol - in which, after death of the body, each Man's soul was reduced to the state of a demented ghost who did not know his own identity.
Jesus came to take away the sin of the world, for those who would follow him; and this meant that after biological death, instead of every-Man going to sheol, those who followed Jesus would be resurrected to eternal life.
Thus Jesus came to change Man's previous universal destiny of death/ sheol - and this applied to those who chose to follow Jesus to resurrected life eternal.
So, after Jesus made 'salvation'/ resurrection a possibility for all Men; then the meaning of sin began to include not only death; but any-thing that would prevent a Man from choosing to follow Jesus.
That is how moral transgressions' work' in causing damnation. They are those moral choices that need to be recognized as preventing us from following Jesus to life everlasting in Heaven. They are moral choices that are incompatible with Heaven.
Repentance is the recognition that these moral choices are incompatible with Heaven - and our willingness to discard these moral choices when we are resurrected.
This is necessary, because for resurrection to eternal life to be possible, we must each voluntarily choose to discard that in our nature which is incompatible with Heavenly life among resurrected men.
The reason is that Heaven is a state of full alignment with God's creative purposes; and Heaven is the situation in which Men work-with-God on divine creation. (This is becoming fully sons and daughters of God).
Sins are what prevent us from having full alignment with God's creative purposes; and thereby intrinsically prevent us from being resurrected into Heaven.
We need to be able to recognize sins as sins, and to repudiate them: to be prepared to discard them forever when we are resurrected.
We must be able to discard these aspects of our-selves at resurrection - or else we physically-cannot be resurrected - and this choice of discarding sin at resurrection is repentance in action.