2005 Toyota Tundra Transmission Speed Sensor

I have a 2005 Toyota Tundra V6 that shifts hard. It’s most noticeable around 25 MPH and 35 MPH. If I turn overdrive off, it shifts smoothly. Does anyone know if this sounds like the transmission speed sensor needs to be replaced?