How to forget Wi-Fi network in system preferences with Applescript
I'm not a big fan of UI scripting, but this works for me on the latest version of Sierra.  You may need to adjust the delay values to suit your systems needs.

tell application "System Preferences"
    activate
    reveal anchor "Wi-Fi" of pane id "com.apple.preference.network"
    delay 1
    tell application "System Events"
        tell process "System Preferences"
            click button "Advanced…" of window "Network"
            delay 1
            -- sets focus to the table containing the available Wi-Fi networks
            set focused of table 1 of scroll area 1 of tab group 1 of sheet 1 of window "Network" to true
            delay 1
            keystroke "Cole"
            delay 0.2
            -- this clicks the button "-" to remove that Wi-Fi network from the list
            perform action "AXPress" of button 2 of group 1 of tab group 1 of sheet 1 of window "Network"
            delay 0.2
            perform action "AXPress" of button "Remove" of sheet 1 of sheet 1 of window "Network"
            delay 0.2
            perform action "AXPress" of button "OK" of sheet 1 of window "Network"
            delay 0.2
            perform action "AXPress" of button "Apply" of window "Network"
        end tell
    end tell
    quit
end tell