Swerve Module Positions Import Not Working

Although there is an import in WPILib as edu.wpi.first.math.kinematics.SwerveModulePosition; there seems to be an error in the code. Any fixes?

Without a link to the full code it is hard to know for sure but it seems like you may be linked to the wrong version of wpilib. the SwerveModulePosition class was intruduced for the 23 season. Check what you are using in build.gradle file

Thank you, my bad. The version was older, from mid-2022s. Thanks!