Looking at the Google docs for ViewModel, they show the below sample code on how to get a ViewModel:
ViewModel
val model = ViewModelProviders
it should work this way
viewModel = ViewModelProviders.of(this@MainActivity).get(MainActivityViewModel::class.java)