The short answer is yes. The longer answer is, well, longer.
Generally the aller future in French is pretty close to the going to future in English. However there are differences.
In the past tense, “j'allais le faire” conveys more immediacy than “I was going to do it”. In English, “I was going to do it” indicates intent, but not necessarily immediacy: you can say it even if you intend to do it at some unspecified time in the future. In French, “j'allais le faire” is closer to “I was about to do it”: there's no fixed deadline, but it indicates the intent to do it soon. In English, you can say “I was going to ask you during the next break”, and this translates directly into French: “j'allais te le demander à la prochaine pause”. In English, you can also say “I was going to ask you the next time I met you, it wasn't urgent for me to phone you”. In French, you wouldn't use “j'allais te le demander” here, but something like “j'avais prévu de te le demander la prochaine fois qu'on se verrait, ce n'était pas assez urgent pour que je te téléphone”.
This difference in immediacy is not universal. In the present tense, there's less immediacy in French. “Range ta chambre ! — Oui, oui, je vais le faire.” corresponds to the English “Clean your room! Yes, yes, I'll do it”, indicating the intent to do it but no particular urgency. To express “Yes, I'm going to do it”, which is a promise to do it soon, you'd say something like ”je le fais tout de suite“.