Certainly heading up-stream from Ubuntu to Debian is a headless option - I've been maintaining Debian VPSes for donkey's. I expect any mainstream distro would be fine, Fedora and Slackware for instance, as it's part of the Linux culture to bolt desktops on top of the CLI.
If you want to avoid systemd, Slackware or Devuan. Look for distros that happily live on a VPS, away you go.