Watch the A La James: 3 online guitar lesson by Ben Lacy from Two-Hand Groove Guitar
Try it along with me. The jump to the F# on the 4th fret is quick, so be ready for it. And remember that last D is the start of the repeat.
Practice this one over and over, maybe loop it. Play it slowly to get it into muscle memory.