My team decided to have a swerve drive this year and I'm having trouble programming it

The CTRE mag encoders are both quadratures, two digital inputs or absolute with is a PWM input to the Rio. Not analog. For swerve you want to use the absolute.

See this for more information Connect ctre mag encoders directly to roborio dio ports