I accidentally set my spawn in the end and I want to get out!

If you have commands, then you can teleport yourself to the overworld with this:

/execute in minecraft:overworld run tp @s <Some coordinates>

You said it is your server, so you probably have access to the save files, so you should be able to change your player data, make sure you have a backup!

The player data is found in C:\Users\(your name)\AppData\Roaming\.minecraft\saves\(your world)\playerdata\(your player ID).dat

The data is in compressed NBT format, so you will need a tool to change it propperly. You will want to set the data tag "Dimension" to 0, this will make the game think you´re currently in the overworld.

If you are the local player, change the player data in C:\Users\(your name)\AppData\Roaming\.minecraft\saves\<your world\level.dat instead (or in both, just to be sure you got the right one).