Acually, both are in danger. Some pregnancies do result in the death of the mother, and even if they don't they always result in significant harm befalling the mother. Childbirth is not a simple, clean process. It has a huge physical, phsychological and emotional impact on a person, and often the consequences are lifelong.
You believe it is morally justified to force a woman to remain pregnant and give birth against her will because it saves the life of another. By the same logic, I believe it is morally justified for me to knock you out and take your kidney if it saves my life. Both are instances in which the life of one individual is weighed as more important and of more moral worth than the right of another to the full use and autonomy of their own body. If you believe it is okay in one instance, you must believe it is okay in the other.
You clearly do not understand the impact that pregnancy and childbirth can have on a person.