Do you have 2 washers between the pan and the bracket? that should straighten it out. Then the part into the shifter arm goes down with the cotter pin at the bottom. Once the bracket is properly spaced/straightened, the angle will be better to insert from the top. Trying to hold it down in place while holding a washer underneath before inserting the cotter pin is a PITA. But that's the way it goes.
The part at the end of the cable should slide in & out of the shift lever very easily with the shifter and transmission in neutral and cable end adjusted properly.