Sahih Muslim Book 27, Hadith 32
I will visit each one of them every night, and every one of them will become pregnant and give birth to a male child who will be a horseman and fight in the cause of Allah. But (it so happened) that none of them became pregnant except one, but she gave birth to an incomplete child. Thereupon Allah's Messenger (ﷺ) said: Had he said Insha' Allah (if God so wills), then every one of them would have given birth to a child who would have been a horseman and fought in the cause of Allah
An oath is to be interpreted according to the intention of the one who takes it.
I will have an intercourse with seventy wives during the night; all of them will give birth to a male child who will fight in the cause of Allah. His companion or the ang I said to him: Say," If God wills." But he (Hadrat Sulaimin) did not say so, and he forgot it. And none of his wives gave birth to a child, but one who gave birth to a premature child. Allah's Messenger (ﷺ) said: Had he said Insha' Allah (if God so will). he would not have failed and his desire would have been materialised.