my boyfriend said If I am keeping the baby We must get married and take care of the baby together.
Well, that's not his choice. Your boyfriend does get a say in the matter in that he can voice his opinion, but ultimately you decide if you're going to have a baby or not, and you certainly decide if you're going to marry someone or not!
I'm assuming you're young and this is your first pregnancy, so correct me if I'm wrong. Some things to consider:
Do you want to have a baby, right now? This is essential.
A billion parents before you have had a partner who "swore they would be there" for them and baby and then was absent. Are you physically, financially, and emotionally able to provide 100% of the care for a pregnancy and a child if that is the situation you find yourself in? Even if you think you two are the most in love that any couple has ever been, this is reality for a lot of parents.
Can you afford the costs to your education, or your work, from having to take leave when you have a baby? Can you afford the medical costs of having a baby right now?
Are you healthy enough to have a baby right now? Do you smoke, drink, use drugs? Do you have any health conditions or take prescription medications you need to talk to your doctor about? The sooner you get care if you decide to continue the pregnancy, the better.
If you have a baby, do you want to parent or plan for an adoption?
If you decide to parent, regardless of if BF stays in the picture, how will you meet your future goals? Will you be able to work with a baby? Will you be able to go to school? Do you have a place where you and baby can live and access to necessities? Do you see yourself being able to provide for your child the sort of lifestyle you think is best for them?
Address that first, independently of rushing into any plans to get married. Babies do not strengthen or fix relationships, they are the hardest and most challenging thing many people will ever do.
I suggest making an appointment with Planned Parenthood or another provider (NOT those "crisis pregnancy centers") that provides unbiased pregnancy counselling. Think about the above points and what you want to do, talk it out with a counselor, realistically discuss your situation with BF, and come to the decision that's best for you.