I hope it fits;they should have put a six in the CB350F from the factory.
I think a couple members here could measure their trans. mainshaft & countershaft length from where the bearings sit tight against each end for the 400F & 350F;I imagine that would be the determining factor as to whether they would swap.The other thing you probably would have to do is get the Complete trans. from someone including all the shims,etc. You could do a parts-check between the two bikes on an online fiche to see if the bearings,etc. are the same,that's where I'd start.