Modern adaptation Count of Monte Cristo?
I was handed a book by a libriarian in the early 2000s and it read very similar to The Count of Monte Cristo.
The Protaganist is wrongly convicted of a crime and sent to prison. While in prison there is a man he brefriends that looks very similar to the protaganist and teaches him alot. They end up trading places and the man is killed and protaganist assumes his identity. The man was a nobleman so when he gets out he has access to money and power he needs to get justice/revenge.
Things I'm pretty sure I rember but not certain: The Nobleman was an English Lord
The Protagonist makes an enemy in prison that ends up killing the nobleman in the shower.
The Nobleman knew it was going to happen and give the protaganist a letter with instructions on what to do to assume his identity.
I hope this is enough to go off. Thank you to any one that helps, I have tried google searches and soliciting Chat GPT to no avail.