Did you try erasing your disk with diskutil? You can do that via this command (assuming your disk is still disk2):
diskutil eraseDisk FAT32 NAME MBR disk2
Here is an explanation of the command:
diskutil: This is a disk management tool provided by Apple.
eraseDisk: Tells diskutil to erase a disk
FAT32: The filesystem format you want to use. You can replace it with any other filesystem, such as JHFS+ or FAT16
NAME: The name of the newly erased disk's new partition
MBR: Partitioning table to use. You can replace it with GPT if you want.
disk2: Your disk's identifier. Replace it if your disk's identifier is different. You can find out your disk's identifier using diskutil list
More information about the usage:
Usage: diskutil eraseDisk format name [APM[Format]|MBR[Format]|GPT[Format]]
MountPoint|DiskIdentifier|DeviceNode
Completely erase an existing whole disk. All volumes on this disk
will be destroyed. Ownership of the affected disk is required.
Format is the specific file system name you want to erase it as (HFS+, etc.).
Name is the (new) volume name (subject to file system naming restrictions),
or can be specified as %noformat% to skip initialization (newfs).
You cannot erase the boot disk.
Example: diskutil eraseDisk JHFS+ UntitledUFS disk2
diskutil partitionDisk disk2 1 MBR FAT32 USBFAT R– David Anderson Feb 18 '18 at 17:22