Count the beats of the bar out loud whilst playing e.g. '1 2 3 4'
It is just about understanding what falls on what beat
when you understand this, the same principle is applied to the words e.g. which words fall on which beats
So, begin by counting the beats out loud
Depending on how you have practised, or if you have ever practised with a metronome, this will be quite easy, or terribly difficult
if you haven't ever used a metronome, then that is your problem - you'll need to go back to square one and understand the rhythm of what you are playing, rather than imitating what you hear
that is usually the main problem - imitating, rather than understanding
PS other exercises you can do - just strum a basic strumming pattern over a chord progression, and try reading a newspaper out loud - make sure you read it 'naturally' i.e. NOT in a beat.
Also get someone to ask you basic maths questions e.g. addition/subtraction etc etc
subtraction is difficult, as with music, you are always thinking forward, but subtraction forces you to think backwards.
Try also spelling words - try spelling them backwards. As before, try to speak naturally, and not in time with what you are doing on the guitar.
That should get you started.