http://www.nomi.med.navy.mil/Nami/WaiverGuideTopics/exams.htm#sna
outlines medical requirements for normal accession. It says:
DVA
20/40 (minus zero) on Goodlite chart, each eye, corrected to 20/20 minus (zero) or better each eye. If uncorrected vision is less than 20/20 each eye the correction must be worn while flying
REFRACTION
edited May 01
(Cycloplegic) Myopia no more than -1.50 any meridian. Hyperopia no more than +3.00 any meridian. Astigmatism no greater than -1.00 cylinder.
This means that you must be 20/40 correctable to 20/20 (you must wear glasses/contacts while flying) AND that your refractive error must be no worse than -1.50/+3.00 and no worse than -1.00 astigmatism. You will probably meet all of those requirements except the astigmatism. If this is the case, you must get surgery to correct your vision. (Before doing that, I'd have your eyes rechecked. It's hard for me to believe that you can read the 20/40 line with an astigmatism or -4.00)
If you must get surgery, the requirements are outlined at
http://www.nomi.med.navy.mil/Nami/WaiverGuideTopics/ophthalmology.htm#lasik .
Part of that says, "appropriate preoperative refractive error range is –8.00 to +6.00 total diopters sphere with no more than 3.00 diopters of cylinder". You obviously meet the refractive range, but if your astigmatism is really worse than 3.00, you WILL NOT get the waiver. If you really do measure -4.00, there are things you can do to get it down to 3.00 before surgery.