Ive got trouble with it starting sometimes when i get in to start it it will on 2005 Chevrolet Colorado

just crank. I you crank very long it has a security sensor that will kick in. When that kicks in I have to wait ten minutes before attemp to start it again. After the ten minutes it starts every time. What can i do to fix this?