Sorry but that's a dumb statement. Don't take it personal, but programming is becoming ever more relevant as everything that is digitalized needs a program to back it up and everything is essentially being digitalized at the moment. It's an unlimited growth market.
I agree that these statements are hyped. Compare it to "don't learn to build a house". Someone needs to know how to do it, but not everyone :-)
I guess the bottom line is that you don't need to be a programmer to handle IT software as long as you don't develop them. Having a basic understanding what's possible is a good idea though, again like with houses, it's not too smart to promise to build a hovering house because you have no idea about the build process.