The US president said he was not going to wage a war against Iran for years