flashing D4 means there is some wrong with transmission, but you already figured out that since it doesn't shift in first.
did you use Honda ATF Z-1 or you used some other fluid? 6gen accords are very picky about ATF, regular Dextron III doesn't work.
is fluid level where it should be? if level too high it can cause more damage to transmission then if it would be too low.
6gen Accords V6 have fragile transmissions and that car might already had some problems with before you got to service it, you might have been a last straw.
since i'm not expert i cann't tell any thing else, you can call some transmission shop and ask would could be wrong. don't call Honda they don't rebuild transmisions here, they send them to original manufacturer in Japan. they only install them.
i just had my transmisstion rebuilt, due to slippage between 2nd & 3rd gear and rough shifting between 1st & 2nd gears, total cost was $2300, but thank god i had extended warranty.