Stretch your chest muscles, do face pulls. Do rows and deadlifts. If your posture is really bad, don't train (strengthen) chest until you've improved things a bit and have done plenty of stretching.
Then use postural reminding aids (don't use a brace unless a physio tells you to), I put a small massage ball behind each shoulder blade and the chair when i'm working, if they fall I know i've slouched.
I went from people openly telling me I needed to fix my posture, to being credited with great posture in about 4-6 months. My posture actually still needs work, because I have pretty noticeable anterior pelvic tilt, but the forward-neck issues are mostly gone.