If your D4 light is flashing it means your transmission is going again. Depending on your symptoms it could be something as simple as a clutch pack or solenoid if you’re lucky, or the more common situation is it’s done for. There are several threads with good info on this, so I’d compare what you’re experiencing with those. Or you can rebuild it (again), or swap to 5spd and be done with auto woes.