Please put out of your mind any idea that you should have changed programs all those months ago. Wishful thinking at this stage about how something else would have been better than where you are will not help you. And it is by no means certain that it would have been better. You would have had to join a new program under the cloud of failure at your current one, and there is no certainty that you would have found another program to take you. Also, now that you are trying to carry on where you are, it is in your favour now that you have shown commitment and "stickability" to your current program.
As to the remediation period you have been offered at your current program, you are going to have to change things if you are to demonstate your success in completing it. You can't change your program, so the only thing you can do to demonstrate your success is change yourself. That means changing both your attitude and what you do. You may feel that both your attitude and what you do have been fine in the past, and that the situation you are now in is unfair. It would be very natural for you to think that: you wouldn't have got as far as you have without being intelligent, hard working and ambitious. But you are now in a situation where you need to be able to convince others of your abilities, so you need to act in a way which convinces them that you are a good doctor.
If you are not going to have a positive approach to the situation you are in, and make the changes to your attitude and to what you do so which convince your program that you are a good doctor, you might as well give up now.
Having decided to stick where you are, and to change yourself, the question then is: what do I need to change and how do I do it? To answer this, you need help from someone who knows what the specific issues are for you and the situation you are in. When being told about the remediation, were you given a supervisor, someone in charge of your assessment for the period? If so, talk to them about what they want to see from you over the period. Make sure you understand what they think your problems have been, and what it is they want to see changed. Break down what they want into small chunks, and work at producing proof that you have met each requirement, documenting as you go. Make sure you have regular checks with them on your progress, probably no less than weekly, so you can be sure they are happy with the way things are going. You need to produce proof that you are doing what it is they want. If you produce that proof, you will pass your remediation.
Make sure you understand who in the organisation will be checking your progress and having input into your evaluation by the program. This will potentially be a lot of people. You need to prove to all of them that you are doing what is needed to pass your remediation.
Do you have a resident adviser that you can talk to? Someone in the organisation who knows the program and will be on your side rather than a part of the hierarchy? If so, you need ask for their help, and to be talking to them on a regular basis.
Good luck.