[noun] + ではありませんでした / じゃありませんでした [na-adj] + ではありませんでした / じゃありませんでした
ではありませんでした is "was not" for a noun or a な-adjective in polite speech: the past of ではありません. It goes straight after the noun or the な-adjective.
mean the same and are just as polite in everyday speech. Among friends the plain じゃなかった does the job.
The past goes on ない, not on です: ない becomes なかった, and です follows it unchanged.
An い-adjective makes its own past negative and never takes ではありませんでした.