It would be useful if you could confirm a few more details. Specifically
1. Where did you travel to/from, and at what time? Can you recall the train operating company ('TOC') you were stopped by?
2.
So I went to buy a ticket.
From a member of staff or a ticket machine?
3.
I tried to change where I was coming from. They said I was lying
Were you lying? If so where did you say you were coming from?
3.
bearing in mind that I paid for the penalty fare which she then refunded
When was this refunded? After you gave false details?
However, from what you've said so far, it sounds like they've passed this on for investigation for prosecution because you gave false details, which is an offence under the Railway Bylaws. Having refunded the penalty fare, they're retaining the option I presume of also prosecuting you for fare evasion.
What will likely happen next is that the train company will write to you and ask you to describe what happened. When you reply, you can offer to settle the matter out of court, which they may or may accept (knowing where you travelled to/from and on which TOC will help us assess whether this is more or less likely). If they don't accept, they will move to prosecute you (though there may be further opportunities to settle out of court - often writing a couple of times is successful, or telephoning after the first letter). There is different legislation that they might use, but none of this would bring you a fine as high as £2000 - this is the highest theoretical penalty, but fines are based on your income level and are likely to be under £500.
Answering the questions above will be helpful though as it will confirm for us whether the train company have followed proper procedures.