NavController - How to replace current page?

I was trying nav,popToRoot() earlier trying to fix my problem here

I didn’t get it to work.

Did you?