The girl is 15-16 years old.
Boyfriend is 18 years old.
Consent was given by the girlfriend.
The couple is keeping the baby.
It is against the law for an adult (age 18 or over) to have sex with a minor, even if the minor consents. An adult who has sex with a minor can be charged with statutory rape. In order for that to happen, the DA would have to file charges against the adult. In short, yes, an eighteen year old boy can go to jail for getting his fifteen year old girlfriend pregnant.
Criminal Defense Attorney
The crime of unlawful sexual intercourse (Penal Code section 261.5) makes it illegal for any person to have sex with a person under 18. If the age difference between them is under three years, it's a misdemeanor. If it's greater than 3 years, it can be a felony. Even if both of them were under 18 at the time, the boy can still be charged.
If they've been having a sexual relationship for a while, any acts done when the girl was under 14 could also be charged under 288(a) - lewd acts on a child (commonly known as child molest).
Can he be charged? Absolutely. Will he do jail time? That depends on all the facts and what his attorney can do to protect him.
It's possible, if someone reports this illegal sexual activity. No one under 18 is legally capable of giving consent to underage sex, so it doesn't matter if she supposedly consented.
The boyfriend should see a good criminal defense attorney if any law enforcement official starts asking questions.
Disclaimer: Please note that this answer does not constitute legal advice, and should not be relied on, since each state has different laws, each situation is fact specific, and it is impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue. This answer does not create an attorney-client relationship.