Read up on continuous motion.
If the shooting motion has begun and the opponent commits a foul continuous motion applys. The ball remains live and the thrower is permitted to finish the try for goal (FT included). However, if the attempt is unsuccessful there is no substitute throw.
If the shooting motion hasn't begun, which is what you stated, then the ball is dead immediately when the foul occurs whether the player was preparing to attempt a try for goal or a FT. It doesn't matter. The FT will be attempted after dealing with the foul call.
You did it 100% right.
Nice work.