Can someone who has done an Aveira pay someone to transfer the punishment to him?
There is a source for transferring a curse. When Rivka tells Yaakov "alai kilelascha bni" (Toldos 27:13), some mephorshim translate this literally. For example, Seforno proves that you can accept someone elses curse from Shlomo Hamelech who accepted Yoavs claim that he cannot get both Dovid's curse and death, so Shlomo accepted the curse and then ordered Yoav killed (Sanhedrin 48b.)
Others do not go with this interpretation. It is unclear if they differ with the above concept.
Either way, there is a difference between transferring a curse and transferring a sin or the related punishment. I thought the above might be helpful.
The Maharsham in 3:151 was asked about such a case where someone sold their sins to someone else.
He first addresses whether or not a valid act of kinyan could be done - if it was done through קנין סיטומתא (ex. a handshake), then the kinyan may be effective even though there is no "object" to be acquired, just as סיטומתא works on something that has not yet come into existence, although he questions whether סיטומתא would really work to acquire something that is not normally sold. Additionally, the Maharsham suggests that since the whole point of an act of kinyan is to display his sincerity, in this case where the effect of the kinyan only has ramifications in Heaven, and Hashem knows if the person has genuinely committed to the kinyan, no act of kinyan would be necessary.
He then moves on to whether such a kinyan would take effect. The transaction here is really similar to ערבות, accepting responsibility for someone else's debt. He brings many examples that a person can become a "guarantor" (ערב) for someone else's punishment, as in when Tannaim or Amoraim declared that they should be the atonement for someone else, as in the first Mishna of the second chapter of Negaim where Rebbi Yishmael says that he should be the atonement for Bnei Yisrael, and if it is just a "cute phrase" why would Rebbi Yehuda HaNasi have included it in the Mishna? However, he concludes that just as a debtor can choose to collect from either the one who borrowed or the guarantor, so too it is up to Hashem to collect from whichever He chooses, and it is the right of a lender to not accept a guarantor.
He concludes that the seller should not be so excited about his sale, since he may not gain anything, but it does display a certain amount of regret for his sins, and would help him if he does Teshuva. The "buyer", on the other hand, should be afraid and worried of possibly getting someone else's punishment, and furthermore should be punished for making a Chillul Hashem by showing his lack of regard for reward and punishment.
I summarized, but you could see more of the details in the Teshuva.
A few thoughts - The Gemara brings down that when Moshiach comes Yitzchok Avinu will end up saying Palga Alai - I will take half of Klal Yisroel's sins upon myself. Can this be a proof that sins are transferable?
In addition if an Aveira could be sold - who would do teshuva on it?