Problems with XRP Encoders and Distance

Hi everyone! I was coding an XRP with WPILib 2027 alpha7 and everything works on the robot coding wise except for the encoders. I have put the encoders on the correct ports in the code (4 and 5 for left motor and 6 and 7 for right motor) and have updated the inputs in the code. However, when I log and print distance travelled by the encoder when the XRP is travelling forward on full throttle, the distance returned is 0.0 (used getDistance()). I used multiple different XRPs and the XRP WPILib template provided by WPILib, and it still doesn’t work. Could someone please help me diagnose the issue and provide potential solutions? Thanks!