The US military has confirmed at least three of its soldiers have been killed in its war with Iran.