Hi Angie,
Those locks are designed to clip in to the filler cap. Yours may have one of the small lugs on the lock barrel either broken or missing because someone dropped it.
Before thinking about replacing the whole lot you could try using a really good glue or sealent to hold the barrel in place. However if replacement is unavoidable you will be able to get one of the shelf at msot motorhome outlets as they are just about all the same for nearly all vans.
Wanderer