By mistake, I spawned an enderman in the creative mode. I even made a beautiful castle there. Will the enderman destroy it?
The Enderman can take individual blocks from your world, but this is relatively rare so there's no chance of it completely destroying a building. (Also the blocks they can take a quite limited, so I doubt your castle is made of something an Enderman can pick up, full list here )
You could however set your game to peaceful mode which will instantly remove all hostile mobs and remove the chance of it taking any blocks at all.
Additionally (credit to AlfredPersonMc ), if you are on a PC version of Minecraft, the command
/gamerule mobGriefing false
Will stop any mobs from being able to damage the map, or pick up floating items without having to disable the mobs completely.