You'll need a Smithy to train swordsmen. To unlock one, first upgrade your village headquarters to level 5.