Would you feel the same if it was the Chinese or Russian government who wanted to prosecute a foreigner for allegedly helping one of their whistleblowers, or for just criticizing their government? Unless you want Americans sent to Beijing for violating the Hong Kong national security law, which applies to everyone in the world according to the Chinese government, I don't see how you can invoke 'the law' against Assange.
Regardless, laws are completely irrelevant to what's right or wrong. Laws are basically just threats, and it's not wrong to do something just because someone threatens to harm you. It doesn't matter if that someone is the Chinese government, the US government, the Taliban government, or some local street gang.