It should just be a couple sentences, like
Dear boss, this letter serves as a two-week notice for my resignation. I have found a different position that better aligns with my career goals yada yada yada yours truly, AJ.
Then pump it into chat gpt to turn it formal, but edit it so it's not too formal.