Between the two i think the '04 sounds like the better deal, with a couple of caveats.
Be sure the '04 has had maintenance done. By that time it should be up on valve check number two. I would think it either had or will darn soon need a chain and sprockets, almost certainly has had a battery or soon will need one.
The only thing I know of that the '04 had an issue with was a bad run of ignition coils. Mine had one but it had it right out of the box so if this one did its probably been long ago fixed. Seems like I also heard something about some electrical wiring that was routed in an area where if could abrade and cause a short, an easy fix if memory serves.
The prices on these bikes run all over the map depending on your area. I bought a brand new leftover 2011 last spring for $7k which is why I have a hard time with an '09 for $6400. On the other hand if thats what they go for in your area and you want one, maybe thats just how it is.
'14 HD FLHR
'01 HD FXD
'09 HD XR1200
'79 BMW R100