Crustpope is correct. If X=0, you can discard 0. However, if X=1 and you don't have 1, then you lose the fort. Likewise if X=1 and the discard part of ACI is prevented by Jerusalem Tower. You lose the fort.
This is similar to Jephthah. You must discard one to use the ability. If you don't have one, you can't use it.