What if there are no buildings among my buildings that can produce stones and I can't repair the castle?
The castle should be unlocked by default, did you use an old save by any chance?