If power is supplied to the Pi then the LED will be on by default. I've got the LED connected to GPIO pins [4, 6] and the script can not turn it off. I've switch the cables around and that's resulted in the same LED behavior.
Here's the code:
from gpiozero import LED from time import sleep i = 0 while True: red = LED(i) print("Attempting to turn off: ", i) red.off() sleep(1) i+=1 if i > 30: exit(1)