Well, that's something that we need to think about: should we allow journalists to be free of charged when they know they sources is actively hacking someone to get those content?
I truly don't have an answer, but I think this ethical question must be done.
The Times, by publishing classified information, were themselves potentially violating the Espionage Act (according to the government's assertion) - so the principle applies in more ways than by proxy. Which is why it was vital that the courts ruling affirmed the importance of a free press, despite laws that might be used to gag it.
Classified information is public information (belongs to the government and have a deadline to be disclosed), so makes sense to apply the same principle of New York Times v United States (1971).
But hacking private phones sounds like a new question to me.
This is not about the journalist knowing the information was obtained illegally. This is about the journalist asking the hacker to get information from people of interest.
We don't need to think about it, the west has largely accepted that a journalist's role is to report the truth of what is happening, and to speak that truth to power. Charging somebody with a crime for upholding that responsibility is corruptly antidemocratic. There are no ethical quandaries to consider unless you feel obligated to play devil's advocate for power holders.
Ethically, if the information is in the public interest, ie it exposes some corruption or something illegal that the government is doing that is a detriment to the people it's representing then I think the answer is obviously yes.
From a legal standpoint, I don't know, but if the answer is a no then that's a problem with the legal system more than anything.
I truly don't have an answer, but I think this ethical question must be done.