A powershell way:
get-childitem | where {$_.name -match 'JPG'} | %{rename-item -path $_ -newname "$($_.basename).jpg"}
Edit: Requested explanation
The get-childitem is much like the old 'dir' command.
where is actually an alias for where-object and is a filtering cmdlet
The percent sign (%) is an alias for the cmdlet foreach-object, which performs a for loop for each item that it is passed.
rename-item is pretty self explanatory. :)
The $_ you see is a special symbol for "THIS." "THIS" is whatever object it is working on at the time.
So in plain English:
"Get the files in the current folder that contain 'JPG.' For each of those, rename them with the original base name, and add '.jpg' to the end."
update: Stumbled across THIS on stackoverflow. Looks like it would fit the bill.