The fix was changing "environment": "server" to "environment": "*" in src/main/resources/fabric.mod.json.
This tells Fabric to load the mod on both the dedicated server and the integrated server (single player), instead of only on dedicated servers.
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }