I am sorry to hear about the redundancy - they are always difficult and emotional situations to deal with. Please do take care of yourself at this time as you are allowed to feel upset by what has happened.
Firstly, redundancy is not a reflection of you or you performance, so it is not an issue to demonstrate that is why your role has come to and end. Redundancy is a common reason for people leaving companies and even high performers can leave if the role is considered surplus to need. I would not worry about this. You can also highlight redundancy was the reason for leaving in your description if you feel this is appropriate.
It also will not be an issue to move to a different type of role. Firms are aware that people move around different type of roles because they need to fund the basics of living. I was at a legal event last night and was talking to people about what we called “squiggly careers” where a career path is not a straight one and people move around and do different things. This is actually quite formal these days - on average people will have 7 careers in their lifetime.
Plus although a teaching role, the role would give you a lot of transferable skills and knowledge. As you have probably considered already, when applying you may just need to think about demonstrating why this change happened in your applications or when describing your motivations.