Nash equilibrium for risk-averse investors in a market impact game: finite and infinite time horizons