Did they tell you which bits of the tests you failed?
As long as you have time on your side and they didn't say you showed no hope, then you have time to work on areas you struggled with. And how you respond to this will give you something to talk about next time round. Life is easy when it's going well, it's when your plan goes tits up that the RAF is interested in your response.
Take heart, it's just a blip. I remember as an Air Cadet in the same situation talking to an AEF pilot - between him and his Nav when on Tonkas, they collectively racked up 7 applications before they made it!