this is a transmission fault; here's some info:
Range switch malfunction could set a DTC P1870.
A mechanical failure of the shift solenoids, TCC solenoid, or TCC PWM solenoid could set a DTC P1870.
Internal transmission failures may set a DTC P1870.
An intermittent or incorrect engine speed signal may set a DTC P1870.
there are several tests a shop can run to identify the cause. definitely not a DIY repair.