Hi, I had the same problem.
I let a server hosting automatically install the Fabric Better MC Modpack on my server.
But the server.jar wasn't Fabric but Forge.
I got the same error: Internal Exception: io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(12) + length(1) exceeds writerIndex(12): PooledUnsafeDirectByteBuf(ridx:12, widx: 12, cap:12/13)
So please check if you got the right server.jar file.