Step 1. Agree to testify in court against your two friends in exchange for the murder charges against yourself being dropped. Tell your friends to play along with your story and not to contradict you, but not to admit to anything either. Go over the case with a legal expert and make sure that the testimony you plan on giving is strong enough to convince the prosecution to drop your charges, but not strong enough to actually convict your friends. That way, you get probation for originally lying about what happened, your friends are found innocent, and everyone goes home happy.
Step 2. Whenever somebody questions you about the murder case for the rest of your life, use your religious beliefs to steer the line of questioning elsewhere.
Step 3. In the third and final step, you pay off the family of the murder victim(s) in an out-of-court settlement, but make sure that the settlement involves a nondisclosure agreement so that the family can not mention what it was for. If you are ever asked about the settlement my the media, either explain that you can not talk about it or simply invoke the loophole described in Step 2.