I have no idea what's wrong but the game throws up the message: This crash may be caused by an invalid Java runtime configuration. Check any custom configuration settings.
I didn't even change my java settings.
The game didn't give me a crash report but here's the latest.log https://pastebin.com/PnjYS5kC
Turns out I was just an idiot, I forgot to launch the server before moving the mods folder in, so it wasn't setting itself up properly.
Thanks for the help anyway.
I have a server with a pile of mods in 1.18.1 hosted with Nodecraft.
The pack I made is working fine on single-player but won't launch on the server, even after I removed all of the client-side mods.
I put the latest.log on pastebin, hopefully somebody here is better at reading the logs than I am.