Imminent threat? Not sure why that's necessarily relevant. Soleimani has been a constant, deadly threat to us and our allies, for decades, and remained so up to and including the attack on the U.S. embassy.
We discovered a window of opportunity to take out this trash, and we did so.
The question isn't of an imminent threat, but that of an imminent opportunity.