Welcome to the forum.
There's nothing you can do that will guarantee that you won't be prosecuted - and from what you say, if you are prosecuted, you will be convicted, which means that you will have a criminal record.
But what you can do is do everything you can to make it easy for TfL to decide they don't need to prosecute you. So you need to make it clear to them that you have learnt your lesson, and will not try to fare-dodge again. You also need to make sure that TfL aren't out of pocket as a result of all of this.
But you need to steel yourself for bad news. On the basis of what you have told us, not only did you use someone else's pass, but when you were caught you lied about it. That means that TfL will start off by thinking that you can't be trusted, so they may not be prepared to agree to an out of court settlement. They may insist on prosecuting you.
What does that mean in practice? It means you need to write to TfL to see if they will agree to an out of court settlement. You need to explain that you know you should not have done what you did: you understand that TfL are entitled to the full fare for every journey that you make and will make sure that you pay it in future, and that you would like to pay the fare that you dodged and the costs that TfL have incurred. And you need to write this letter politely, and make it short.
If you are lucky, TfL may agree to settle. The fare that you dodged won't be very much, but the costs that TfL have already run up will be quite a lot, because it sounds as if they will have contacted your cousin, who will have to have explained that it wasn't them, and then TfL will have to have found you. You will be looking at a settlement of maybe a couple of hundred pounds.
But this will be cheaper than what you will have to pay if you go to court: there's another thread on this forum where someone was given a conditional an absolute discharge* (so they were found guilty but didn't have to pay a fine) but also had to pay court fees of £255. If you are fined, that will be on top of the court fees. So even if TfL won't settle the first time you write to them, write to them again at every opportunity. If the case goes to court, then try talking to the prosecutor before the case is called: sometimes it is possible - even at the very last minute - to agree an out of court settlement.
But if you can't get TfL to agree a settlement and you are charged a fine, then the fine will be based on your income. If you don't tell the court about your income, they will assume that you are quite well-paid. As a student, I would guess that you don't have a full time job so you're not well-paid. So it's in your interest to find evidence of what income you do have. That means things like bank statements, and (if you do work) payslips, to show what you have coming in.
You are not in a strong position. So you need to be polite to TfL and co-operate with them. You may be lucky and it will work, or you may not be lucky and it won't. Either way, start saving now to pay the settlement or whatever the court charges you.
* edited to correct a brainstorm on my part