Imagine two people are in a war. They are trying to decide whether to jump out of the trench into the fray. One of them says,
"I will go if you will go." =
"I am willing to go if you are willing to go."
Imagine two people are in a war. One of them tells the other to wait while he makes a dangerous run. The other says,
"I am going to go if you are going to go." =
"It looks like you are going to go, so I am going to go whether you like it or not."
It also works in the past tense, but with a caveat:
(1) "He would later write a memoir."
(2) "He was later going to write a memoir."
(2) can mean either (A) he intended to write a memoir later, or (B) he later wrote a memoir. Statement (1) means only (B).
Just be careful, though, because there are other uses of the word "would", such as in subjunctive mood. Those do not apply here.