Praise be to Allah.
I’tikaf is only valid if done in the mosque , because Allah says (interpretation of the meaning):
“And do not have sexual relations with them (your wives) while you are in I‘tikaf (i.e. confining oneself in a mosque for prayers and invocations leaving the worldly activities) in the mosques.” [al-Baqarah 2:187]
Men and women are equal in this regard.
Ibn Qudamah said in al-Mughni:
“A woman has the right to observe i‘tikaf in any mosque , and that is not subject to the condition that it be a mosque where prayers are performed in congregation, because that is not obligatory upon her. This was the view of al-Shafi'i.
She does not have the right to observe i'tikaf in her house, because Allah says “while you are in I‘tikaf (i.e. confining oneself in a mosque for prayers and invocations leaving the worldly activities) in the mosques”, and because the wives of the Prophet (peace and blessings of Allah be upon him) asked him for permission to observe i’tikaf in the mosque, and he gave them permission.”
Al-Nawawi said in al-Majmu’ (6/480):
“It is not correct for a man or a woman to observe i'tikaf anywhere except in the mosque.”
This is the view favoured by Shaykh Ibn ‘Uthaymin in al-Sharh al-Mumti’, 6/513
And Allah knows best.