This verse speaks towards the sin that dwells in our flesh and will always be there. Paul spoke of this in Romans 7:17, that it was no longer he (the spirit person) that sinned, but sin that dwelled in his flesh. God makes merciful allowance for us all, as through the stages of our growth, and when we are weak, He is strong to forgive and cover us when we are ignorant of sin that may be in our lives. As we grow, the Holy Spirit leads us into all truth concerning sin.
Rom, 7:17 Now then it is no more I that do it, but sin that dwelleth in me.
Earlier, too John speaks towards us as sinners in 1 John 1:8-2:1, yet in the verse following 5:17 says that those born of God don't sin......Well, the battle between the flesh and spirit in man goes on till death of the flesh and the receiving of the new body which is fit for eternity. When speaking towards our spirit, we cannot live in sin and be comfortable in our spirit, unless we are not really born of God, but our flesh is always willing to sin by its old nature that we were born with physically.
This part of the good fight we must fight - to battle our own flesh's nature to sin and control it with the new spirit God has given us and with the indwelling Spirit of God.
Galatians 5:17 (KJV) For the flesh lusteth against the Spirit, and the Spirit against the flesh: and these are contrary the one to the other: so that ye cannot do the things that ye would.
Galatians 5:17 (LIV) For we naturally love to do evil things that the Holy Spirit tells us not to do; and the good things we want to do when the Holy Spirit has His way with us are just the opposite of our natural desires. These two forces within us are constantly fighting each other to win control over us, and our wishes are never free from their pressures.
Gill for your verse:
"and there is a sin not unto death"; this is added for the relief of weak believers, who hearing of a sin unto death, not to be prayed for, might fear that theirs were of that kind, whereas none of them are; for though they are guilty of many unrighteousnesses, yet God is merciful to them and forgives, Heb_8:12, and so they are not unto death.