Hello and welcome to JustAnswer!
P1788 is for the 2/4 clutch hydraulic pressure switch. This code sets when the pressure switch is in the wrong state for a given gear, or there is a problem in the electrical circuit for the pressure switch. It could be internal trans (very rare), the pressure switch, wiring, or the trans controller. It's a failed pressure switch almost 100% of the time. All pressure switches and solenoids are located in the solenoid pack mounted to the front of the trans, right under the input speed sensor you replaced. Most likely it's going to take a solenoid pack to fix your problem.
Here is a link to the aftermarket Dorman solenoid pack at Autozone.
Sure. It's right on the front of the trans under the input speed sensor you replaced.