Well I can tell you my experience.
I was very close to Jesus from ages 15-21. I was exemplary to a lot of people, both Christian and non-Christian, of what true Christianity looked like. I had made very conscientious choices about what foundations I put in my life, and I was rock solid.
Due to my lifestyle of living so very focused on the Lord, I got to the point where no one was pouring into me anymore. I tried changing churches for better instruction, but no one was really taking care of me. A lot of the people, it not all the people, closest to me were hurting me as well, but in being stalwart, I never complained.
Finally I got to the point where I broke down. Something you don't hear about very often, but can and does happen, is that the extraordinary pressures of life got to me, and I began to crack spiritually. In the next 16 years I got worse and worse, and the rift between me and Christians (and Jesus) grew. I don't think I have ever personally met another Christian who tried as hard as I did while also having so many obstacles. Consequently, it is almost impossible for me to find Christians who are mature enough to help me. Over time I appeared to regress in maturity and in faith and in behavior, and now I appear less than average spiritually, so many mediocre Christians look down on me.
I sought a lot of help but never got back on my feet. In the time I spent trying to get back on my feet, I explored things considered sinful by most people.
Regardless of what anyone tells you about rebellion, the answer is repentance.
My problem has not been an unwillingness to repent, but handicaps in life I now have which make repentance seem pointless. And when you sit around handicapped, you might wind up filling your time with activity that is less than holy.
I guess the point of what I am trying to say is that sometimes rebellion is due to a heart that is unwilling to turn to Jesus, but sometimes what looks like rebellion on the outside is just coping with misery.
If you want to change, then you need to identify which of these two causes is your problem. If you are living in sin due to true rebellion, then you need to get on your face, acknowledge your sin to Jesus, and beg Him for forgiveness until His peace washes over you. But if you have external factors causing you to sin, then this is different. Maybe your circumstance causes you misery. Maybe your loved ones don't respect or love you. Maybe a lot of people misjudge you and wrong you everywhere you go. If enough pain happens, it can bring us to a different level beyond simply getting right with God.
If it is the second reason, you need to look for a safe place for yourself to be, and spend a lot of alone time with Jesus. You should know that it will take time to rebuild or build your relationship with Jesus. If you have been in rebellion, or apparent rebellion, for a long time, then I think it is reasonable to expect it to take time building trust with God. Habits tend to go away more easily when they aren't based on pain, but when they are based on deep rooted pain, it can take a long time. For example, I met an old woman who explained her life story to me. She was once a young Christian virgin with high standards, hoping to marry a godly husband. Then she got raped, I think maybe even gang-raped. After that she changed. She became promiscuous, and was promiscuous for the rest of her life. Is that rebellious?
Sin separates us from God, no doubt. When I met that woman she was in a bad place in life. And life apart from Jesus separates you from His protection. But it is very hard, even for Him, to heal what is badly broken.
Now at this time I have been seeking the Lord seriously for a few weeks. I have been seeking Christian fellowship and I have been on my face praying for hours most days. For some reason I can do this, whereas I couldn't it before. The reason why is pretty unhelpful: my external factors changed. In other words, it was neither something I did right nor was it a miracle, just plain dumb life. For some reason I feel more able to pray and seek the Lord's face, and I am taking advantage of the opportunity to try to get right with Him because I don't know when my external factors will change again and I won't be in the right frame of mind to pray to him anymore.
So repent while you can, if you can.
If you are on the fence, try praying, "Jesus, I don't want to repent. But I want to want to repent." This worked for me when I was 15-16.
A lot of repentance is only made possible by the conviction of the Holy Spirit. And you can't control God. But you can invite Him.
Peace.