Before starting the troubleshooting procedure, please make sure to use new batteries and check if the battery was inserted correctly.
For the Nano green/purple laser, the batteries needs to go in with the negative end first.
For the Nano red laser, the batteries needs to go in with the positive end first.
Was the "interlock key" (pin) on the endcap pulled out or loose?
If it was loose or put back incorrectly, it may cause the laser to become unstable.
Check inside the barrel with a flashlight and see if the spring is touching the inside wall. If it is that might be the cause of the problem and just needs to be gently moved into center position.
An additional check is to confirm if it may just be a connection problem with endcap, here's how to by-pass it:
1) Take a small piece of aluminum foil about the size of a finger nail and fold it in half.
2) Take off the end cap, lay the foil across the positive tip of the battery and make sure the foil is touching the threads on the inside of the laser as you put the end cap back on.
3) Be sure to not get the foil in between the threads of the cap and laser as you screw on the cap as it can jam up the threads and ruin the laser.
If the laser works, the problem is just with the endcap and will need a replacement.