“JPEG” refers specifically to the format of the file content. “.JPG” merely refers to the extension portion of a file’s name.
A file’s name has no necessary relationship to the file’s content (though Windows commonly uses extensions to choose programs to open files, and this leads to many confusions). You can have text files with .JPG extensions and JPEG files with .TXT files if you want to. Windows may be confused by such names, but other OSs (e.g., Linux) generally work more on actual content and don’t care much about extensions.
Most likely, if it’s a JPEG file, just rename it to end with “.JPG”. And if that fails, either the file isn’t really a JPEG file or the application that reads the file is at fault.
To determine if the file actually is a “JPEG” file (no matter what extension it has), you might simply open it with a text editor such as Notepad. Most often, there will be “JFIF” in positions 7-10 at the start of the file. If it’s “JFIF” it should truly be a “JPEG” file. Many digital cameras might actually create “Efif” (Exchangeable image file format) files even when you think they’re “JPEG” files.