I just want to add that I fixed it with the fix from Johan136 with a small change. I had the same issue, could not turn firewall on. Two other fixes I saw that worked for others (smart scan and rebuild) did not work for me.
I didn't want to reset all my settings and loose all the work I had done to customize Avast. So before clicking RESET to DEFAULT I
1) Disconnected my internet connection
2) Clicked Back Up Settings
3) Clicked Reset to Default / Reboot
4) Verified all settings were lost. Clicked Restore Settings and loaded the file generated in #2
5) Rebooted Computer / Verified all settings were back where they were.
6) Connected Internet back to computer. Ran Smart Scan just for giggles and went through all the settings to see if I wanted to change anything (there were some new options since I last looked at it).
At this point everything seems to be fine. I did not loose any settings and my firewall was now turned back on.
I got this solution from Avast, it works for me, i hope it does for you.
Open Avast Premium Security -> Press Menu in the Top Right -> Settings -> General -> Troubleshooting -> scroll down to Reset all settings and click on Reset to Default and reboot your PC