The answer to your question depends on a number of factors. What was it for? How long ago was it? Have you demonstrated that you learned from your mistakes and matured?
Have you had a chance to search the forums? There are many Sailors who have shared the NJP + STA-21 experiences here on AW and their posts can provide some perspective.
+1 on HH-60's post.
So long as it's been 36 months, you're clear of the requirement.
Best advice? Fess up in your application, show that you've learned since then (this will come through in the 5 evals that are required for the STA-21 package) and you've got just as much of a shot as the next guy who
didn't have NJP, provided all things are equal. I myself have had NJP in my past, but when I applied (after I had passed the 36-month requisite mark), I was selected, went to college, graduated, commissioned, and now I'm awaiting class up at API.
We all make mistakes at some point in our lives. It's what we do afterward that shows who we are.
Best thing you can do is apply. Good luck!