First Let's remove some confusions
Every hard drive needs one or more partitions to be useful. Partitions are created when you create a filesystem on it. Most used partitions scheme is MBR. In MBR, you can have only 4 partitions in a disk. These are called Primary partition. If you need more than 4 partitions, You can make one of the 4 as Extended partition. This extended partition works as a container and it turn can hold more than 1 partitions. These partitions are called Logical partitions
In your GParted image, the first partition (bigger one) is a primary partition. And the Swap partition is a logical partition inside an Extended partition
If I understood your question correctly, You later installed Ubuntu on SSD, but you still have that 2TB disk with two partitions. 1 with 30 GB of Data and another is a swap (inside an Extended partition).
If you're trying to free the space of linux-swap thinking It's useless, Then I'd say not to delete that partition. Because Linux Swap is helpful for hibernating and 31 GB won't hurt much considering your disk size.
If you really want to remove the swap
If you really want to remove this swap, click on the swap partition, right click, select Swapoff. Then again select it, right click and use Delete to remove the partition.
You can then see that there is still a partition (extended partition) with empty space. Select that space, right click and select Delete again. This will clear the Extended partition
Now, select the partition with Data (bigger one), right click -> Resize/Move and in the new Resize Window, move the right slider to far right to fill the partition. Finally click Resize/Move button.
This will give you 2TB disk with only the single partition with Data.