1. you need to make sure your settlement is at appropriate level
2. did you copy/paste the correct building name? and building level

it's for example

building
{
type guild_swordsmiths_guild swordsmiths guild
}