sforce.console only works in the classic console. The Lightning Console API is not GA yet. You can see information about the pilot here: https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_js_getting_started.htm.
Look at this question, it talks about how to use force:refreshView Reload whole page in 'lightning' using java script