Advice on Age difference+ Baby?

I recently found out im pregnant, My boyfriends 22 im 17.. we have been together for a year my parents absolutly adore him but we live in california where the age of consent is 18 can he get prosecuted even though my parents are okay with our relationship or should we find a lawyer ? 😓