Led keeps on after statement is reached

AngelinaNoLee:
i cant progress further and need to learn the basics again?

Clearly you never learned the basics in the first place so yes you do need to take a few steps back before you will be able to progress further in an efficient manner. That's just the way it works. I know the impulse is to just skip over the boring stuff but it will only cause a lot of frustration in the end. You have a lot of complex code running on two different Arduinos but you don't even understand how to blink an LED. The key to success, whether you're a beginner or a pro, is to break a project down into stages and get each part working perfectly before moving on to the next one. You're having trouble turning an LED on and off so you need to write the most minimal code that can do that, get it working, make sure you understand every line of that code before proceeding to add it into your project. Luckily for you a minimal LED blinking sketch was already written for you so part of that process is already done. In the time you've spent arguing about it you could have just done it and been on to the next step in your project.