In new versions of NetBeans IDE already installed some standard dark themes – FlatLaf Dark, Dark Metal and Dark Nimbus. You can use any from them.
To enable/apply already installed in NetBeans IDE dark theme just go to: Main menu → Tools → Options → Appearance → Look and Feel → Preferred look and feel → Dark or another appropriate, and press Ok button, and after do restart program.
Also you can change fonts and colors profile on dark here: Main menu → Tools → Options → Fonts & Colors → Profile → City Lights or Norway Today or installed Dark or another appropriate, and press Ok button.
You also can select, download and install other desired dark themes. For it go to: Main menu → Tools → Options → Import… button → Browse… button. In this open file dialog select prepared theme file and press Ok button.