You have really mistaken by conditioning such a thing, may be your circumstances were such that you had to do that.
Anyway just now artistically handle this matter, you should marry but avoid the situation which would make you loose the custody of your husband.
The divorse seems initiated by you, right?
Anyway can you give details as under; ( for seeking absolute custody till the age of maturty of a child you need to satisfy court regarding below;)
You must prove that child shall have much better welfare with you instaed of her father
Education, morals, family atmosphere even the area where you live is much better that your husband
These some factors you need to satisfy court
Your ex husband whether re- married or not ?
He can claim that your marriage will make ignorance of care for your daughter
The Court looks in the welfare of child and that is it.