Problem with turning LCD off

Go back to basics. Forget about the button being pressed or not for now and just print something to the LCD. If that does not work then check your wiring to the LCD and the integrity of all joints, jumper leads and plugs. Push/pull/wiggle the leads. Does anything change ? Have you got the LCD backlight turned on and contrast adjusted with a suitable potentiometer ?