Have you pulled the main harness on the transmission and cleaned it? Had an 05 that kept throwing trans codes after replacing all the solenoids it turned out to be the connector on the harness. Might help?
Put a Tech 2 on it and see if D solenoid fires, if it does then check to see if the D pressure switch in the PSM closes. If it doesn't close it is either a bad PSM or a stuck or draggy D shift valve.