Hi LucyHelen and welcome to the forum. This is a good place to come for sensible balanced advice, and I hope that you understand that when people come across as challenging, it is genuinely done with the intention of being helpful to new forum members' situations.
It might help if I express what happened in a different way, and then you might understand why Northern are taking what appears to be a harsh approach.
As previously posted, Northern have lots of stations without ticket buying facilities, so a lot of their customers have to pay either on the train or at the destination station.
Some customers, particularly those travelling just a stop or two, and particularly when travelling between two unmanned stations, might deliberately sit somewhere in the train where they know (perhaps from past experience) they are unlikely to meet the guard. Or they might even actively evade the guard, knowing that s/he will not be able to get to them before having to attend to other duties.
Such passengers might "think they have got away with it" upon arriving at their destination station, and walk straight past the (open) ticket office, despite knowing full well where it is.
They might then see an RPI (ticket inspector) at the exit of the station, and either:
(a) turn around to get a ticket at the ticket office; or
(b) buy a ticket from the ticket machine.
(Note that you could have bought a Glossop to Broadbottom return at Glossop, and handed in the return portion to the RPI, and been unlikely to have been challenged.)
Now, I appreciate that none of this applies to your circumstances. But it could equally well have done.
The fact you said to the RPI "I need to buy a ticket" honestly counts for nothing. Nobody was going to get past the RPI; you didn't have a ticket; so what else could you have said other than "I was trying it on and trying to evade payment".
Nor does your attempt to buy a ticket. Whilst you would probably have been allowed past if you had done so, as you didn't actually buy a ticket you didn't help matters by attempting to do so.
---
So, to sum it all up, Northern face a lot of fare evasion, and it wasn't as unreasonable as you think for them to think you would have walked out of the station if no RPI had been there.
Your admission that you would have bought a single ticket on the way back, is very damning in their eyes. The fact the single fare is only 10p less than a day return is academic - you have told them that you would willingly have paid 10p too little for your travel.
As I've pointed out, you could have bought the return fare "the wrong way around" and then they really wouldn't have any credible case in court, even though it is not strictly correct to do so. (In fact, using the return portion first is absolutely allowed; what is not strictly allowed is using the outbound portion second, but I doubt this is enforced in practice very often if at all).
Following other's suggestions, I think an honest response to Northern's letter, with an offer to pay any fare you haven't actually paid (presumably the 10p?) plus a gesture towards their inconvenience, would be a reasonable outcome for you.
Whilst it's easy to take the moral high ground, and to say that you weren't in the wrong, strictly you should not have reached the station exit without paying.
Sorry if that isn't the news you wanted to hear.