IMO I don't think you can build a quality upper for $400 . Don't get me wrong you can build "A" upper for that , but not a quality longer range accurate one. Really any AR should be accurate out to 100 yards . My stock ARs will shoot 2 MOA and under no problem with quality ammo . I've been doing alot of research and been planning on doing this very same thing .
IF your on a strict budget I would consider a complete upper http://palmettostatearmory.com/index...ng-handle.html
You would still need a BCG and charging handle $150 and the total for the upper and BCG/handle would be about $510
If your going to build it . Don't skimp , do it right
There are a few things that are a must for an accurate upper .
1) Quality barrel http://shopwilsoncombat.com/Wilson-C...-223SS20NF-18/
2) Free float hand gaurd $180 http://palmettostatearmory.com/index...andguards.html
Now thats $430 right there and you still need the receiver $100 , BCG $150 , Charging handle /gas block and tube $80 to $100 , and a scope $200+
With out the scope I got up to $780 and that would be a nice accurate upper .
Oh and the tools to build it