Between a rock and a hard place
First of all: pole sana. This is a difficult situation and you might feel stuck between a rock and hard place. It seems that you want to do the right thing and be present for your child, but you are struggling to figure out how it will fall into place.
You can force yourself to marry this woman. Whether or not you should is a separate matter. Miserable people make lousy parents. Is the pregnancy the only reason you are thinking of marrying this person? Were you dating and the relationship hadn’t become serious but you like her and care about her?
Think it through carefully
This is a deeply personal decision and nobody can tell you what to do. Your choice will profoundly affect three lives so I advocate that you take your time and make it carefully.
Yes, the baby is coming and it might feel like an emergency but take your time. The baby has its timeline and you have yours. Also, your child is yours for the rest of your life.
Communicate with the mother and let her know what you are considering so she is not left torturing herself in the dark.
Let her know that you will take care of the child so that she can relax on that front; but also that you are debating the marriage question then take your time. I find that setting a personal deadline to make complex decisions such as this one quite beneficial.
Be there for them
In the meantime, avail yourself for clinic visits and start setting money aside for the delivery and shopping for the baby.
Incidentally, there’s another question to ask yourself: Does this woman even want to marry you? You might find that like you, she wants a father for her child but is not particularly keen on marrying you.