You will need to use the device and possibly the jack you last used on the device output last used. In my case I used a Samsung Soundbar for a television set (testing it). Below are the steps that worked for me.
Step 1. Plug in device and jack last used that caused the issue.
Step 2. Play iTunes through the jack and device.
Step 3. Pause the sound.
Step 4. Launch System Preferences (make sure it was closed prior to step 1).
Step 5. Go to output tab.
Step 6a. Unplug the Jack and it will reset to internal speakers. (if not go to Step 6b)
Step 6b. While remaining on Output tab of system preferences, continue to plug and unplug the jack connected to the output device and it should reset itself after several attempts. You can always see the red indicator light as you insert in the jack and if the light is no longer present, you are successful and the output field will display the text Internal Speakers.