Invading Afghanistan endangered Afghan civilians, and recruiting Afghan civilians to work for the US while Afghanistan was not and was not going to be wrestled from the control of the Taliban endangered them. Why do you not consider this a moral case for Assange to damage the US (by leaking information), but consider Assange's leaks endangering Afghan civilians (by modulating the risk inherent in the US actions described above!) to be a moral case for the US to damage Assange (by subjecting him to legal harassment out of line with established norms of civilised society)?
The situation to me seems to be only a few steps removed from something along of the lines of $government outright taking some civilian hostages and threatening to execute one of them every time someone reports on any of $government's wrongdoings. In a scenario like that, would you also say that the act of reporting is immoral because it endangers civilians - and hence cheer on $government's long hand punishing the reporter?