the two center front studs on the CB350F motor are longer in order to allow the head nuts to attach. The casting on the 350 motor is thicker in those areas than on the 400. So it will physically fit and it uses the same cam. I think that the valves are a half mm or something smaller. So you will need to install longer studs in the front center spots to get it to bolt onto the 400 bottom end.
I did the opposite swap and ended up using some spacers to fill in teh area on teh 400 head so that the nuts would tighten down on longer studs.
TR