There may be a setting in your app that allows you to adjust the actions of swiping. If you register, you can reply and let us know what messaging app you're using, which may help us give more specific answers.
Regarding your concerns over getting a virus, there isn't much to worry about from texts. If you open a text message with a virus link in it, you still have to tap the link to even begin to proceed with an infection. The simple act of opening the message will do nothing. There have been a few texting based malware vulnerabilities, but those are exceedingly rare and are usually targeted attacks (meaning not random spam). Those attacks also only apply to older versions of Android. In the extreme off chance all the stars line up and you get one of those attacks, they infect you without any action on your part. That means even if you delete it without opening the message, it's still too late anyway.
So in the mean time, just open the messages to delete them and don't be concerned with what's inside infecting you.