If this was a widespread thing that many journalists spouted, I understand the outcry. If only a few journalists spouted this nonsense, then I don't think it's fair to punish an entire industry over some bad apples.
What I suspect is that the "learn to code" push was more of a society-wide meme trafficked by politicians, economists, and tech CEOs. And I have to imagine that some journalists gave those people a platform. But perhaps I'm looking at the wrong evidence?
EDIT: dexen's post found maybe one example: A Buzzfeed quiz that suggests coding could become the next blue collar profession. That kind of fits the "learn to code" meme. The other articles dexen posted were actually counter to that - An article where Michael Bloomberg said learning to code is unrealistic for many displaced workers, and another article about coal miners proving him wrong.
Is that it? Or are there more examples?