With Sitecore Forms 9, how to Group options in multi-select list box?
You will need to make a custom form element.
The fieldtype itself is quite easy to make following Sitecore's documentation: https://doc.sitecore.net/sitecore_experience_platform/digital_marketing/sitecore_forms/setting_up_and_configuring/walkthrough_creating_a_custom_form_element
Creating a good editor is a bit harder, if you want to make the options inside the Forms interface. But if you could use an external datasource (such as an item hierarchy somewhere in the solution) it should be easier to just point at the root for this hierarchy. Here's some inspiration for making a fieldtype with external Hierarchy for building up the control: https://mortenengel.blogspot.com/2018/06/fifa-world-cup-part-2-of-4.html