Your code is wrong. Look at this example.
Serial refers to the native Serial. If you want to use a SoftwareSerial, you need to make an instance like this: SoftwareSerial mySerial(4, 3); and then use mySerial instead of Serial. In the example it's a bit confusing because they use a native and a software serial at a time.