I don't know how that spring could come out or be put in wrong unless someone had the pistol apart. The following assumes the slide is off and upside down, with the safety and firing pin removed.
Anyway, the spring is coil, with an "arm" that pushes the indicator down. To install the indicator and spring, insert the long thin arm of the indicator into the spring with the spring "arm" pointing toward the front (short end) of the indicator. Keep the "arm" pointing down (toward the top of the slide) and insert the rear end of the spring and indicator into the hole in the slide so the rear of the indicator protrudes. Either using pliers to grasp the rear end of the indicator, or using a punch to push the front, push the indicator to the rear and down. Remember to make sure that spring "arm" is downward.
Make sure the indicator goes all the way down - it tends to get stuck in the firing pin hole. The indicator should now work OK.
Jim