What is the ruling on someone who vowed to fast for two consecutive months, but failed to do so?
He is obliged to fulfill his vow by fasting for two consecutive months, but if he fails to do so then, it remains a debt on him until he either fulfills his vow, or dies. In case of his death, his guardian is supposed to fast on his behalf, or donate food from his estate in return for fasting, but if the guardian fails to do so then, it is all in the Hands of Allah.
Is prayer nullified by having thoughts while performing it?
Prayer isn`t nullified by having thoughts while performing it, provided that the praying person offers all of its pillars and meets all of its conditions. However, the reward decreases significantly in the absence of reverence since a praying person is rewarded according to the attentiveness of his/her heart during prayer.
Does Husband fasting while being impure for having sexual intercourse with his wife at night permissible?
Yes it is permissible for you to fast because impurity isn't among valid fasting conditions, but you are obliged to perform ritual impurity in order to catch up Fajr prayer at its due time. And Allah Knows Best.
What is the ruling on determining the sex of the baby whether through killing the female spermatozoa, or any other way in order to have a male?
If it is done through having a certain type of food, taking a certain type of medication, or organizing the time of the marital relation, then it is permissible.