What should the US have done instead? He was planning and committing terrorist attacks and there was no way to simply arrest him. Why should the US be obligated to allow Americans to commit war crimes when they are unreachable by law enforcement?
What law did the US break? The guy was a member of Al Queda. Congress explicitly initiated a war against Al Queda. The guy wasn't in a place where US law enforcement could reach him. Which is kind of the definition of being at war.