Your problem is that you don't understand the output of the
file command. I used Paint.NET to save an image as 32-bit PNG, 24-bit PNG, and 8-bit PNG. Then I ran the
file command on them:
$ file *bit.png
08-bit.png: PNG image data, 800 x 600, 8-bit colormap, non-interlaced
24-bit.png: PNG image data, 800 x 600, 8-bit/color RGB, non-interlaced
32-bit.png: PNG image data, 800 x 600, 8-bit/color RGBA, non-interlaced
As you can see
8-bit/color RGBA is actually what Paint.NET calls a 32-bit PNG, because it's 8 bits per color * (3 colors + 1 alpha channel). 8 * 4 = 32. A 24-bit PNG is the same, but without the alpha channel: 8 * 3 = 24.
If you want what Paint.NET calls a 24-bit PNG, you need to remove the alpha channel. As far as I can tell, GIMP always exports a PNG with an alpha channel if any of your layers has an alpha channel.
If you're only using 1 layer, then it's simple: Go to Layer > Transparency > Remove Alpha Channel and then export. You'll get a 24-bit PNG.
If you're using multiple layers and need transparency effects, then jthill pointed out that you can use Image > Flatten Image to remove the layers with transparency before exporting. You can then Undo to restore the layers.
You can also post-process the exported PNG to remove the alpha channel. You could load the exported image back into GIMP, which will make it 1 layer, remove the alpha channel from that layer, and export again. A better way is to use optipng, which will usually compress a PNG better than GIMP can in addition to removing a useless alpha channel.