An obvious challenge is that we don't have available green base load power -- nuclear, hydro, or geothermal -- at anything remotely resembling the necessary scale. The requirement for base load power follows from the economics of industrial chemistry, which becomes much more expensive if you can't run your process in a continuous steady-state equilibrium. If we tried to produce ammonia via micro-batching chemistry or similar, those economics may not be practical.
The other unfortunate reality is that ammonia production is often a way to extract value from excess methane that might otherwise be vented or burned. It is a better use than the alternative. It isn't a coincidence that ammonia is primarily produced in countries with a persistent surplus of methane. As long as we have vast amounts of methane lying around, and we will for the foreseeable future, conversion into ammonia is a pretty reasonable choice since that carbon will often end up in the atmosphere regardless.