Although the name might scare people away, [Japanesewithanime][1] actually has a really in-depth post that covers this topic. I'll just quote the relevant part discussing why your guess was right, but there's a ton more information, so you might want to read through it.

> The na of na-adjectives is actually a copula. The prenominal copula, or attributive copula.

> Basically, da だ is the copula you use in an independent clause, while na な is the copula you use in an attributive clause, also called adjectival clause. A clause that describes nouns.

But there isn't a negative form of な, so you have to go back to だ.

> The negative form of na-adjectives is literally just replacing the normal copula by a negative copula such as denai でない, dewanai ではない or its contraction, janai じゃない.

He includes a link talking about the difference in usage between [ではない and でない][2]



  [1]: https://www.japanesewithanime.com/2018/11/na-adjectives.html?m=1#attributive-form
  [2]: https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q1363483578