Here's what you need to do to put a timeline on SquareSpace.com:
First, add an "embed" block (not a code block)
Then in the configuration, click on </> to edit the details of the embed.
In the Edit Embed Data box, paste the embed code from step 4 of the TimelineJS authoring tool.
Now, click "set" in the Edit Embed Data box, and then click "save" in the Edit Embed box. You should see your timeline.