On the modified $J$-equation