Best of luck with this. And don’t beat yourself up too much. My children are young but I already know that they are experts in outsmarting us oldsters! (And I don’t think I ever did anything jailworthy, but I certainly did a lot of things myself as a teen that I’m very glad I was never caught at! And of course would never do now.)
Much very good advice here. I would just add that teens are still not good at really thinking through possible consequences of their decisions. They are also bad at visualizing real consequences. If you can do so in a matter-of-fact way, rather than super-emotional, take him to a homeless shelter and let him see the people there — some there through no fault of their own, but many others there because they made bad decisions and ran with bad people. Does he want to be one of those people? Find out if a prison or jail near you has any kind of “scared straight” program, or gives tours or anything. Take him to one of those places. Is that really, really the sort of place he wants to spend years of his life? Surely not....
Best of luck, and keep the faith, things should get better now. Blessings on you and him.