Hello lilmsqt98,
Welcome to Apple Support Communities. The short answer to your question about using a promotion code for Apple Music for a family plan is: no.
We'll link resources below for you to look over with this information. Because the code is related to an individual subscription, once you join a family group, that individual subscription will be automatically canceled.
If you can't redeem your promotion for an Apple subscription
Get an Apple Music family subscription
If you have any additional concerns, let us know.
Take care.