To do this, you have to run Bitcoin Core with the flag -zapwallettxes. You can do this via your command prompt. Assuming you didn't change the installation directory, these are the sample commands. Choose the one accordingly.
C:\Program Files\Bitcoin\bitcoin-qt.exe -zapwallettxes
C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe -zapwallettxes
Note that you should wait for a day or two and ensure that majority of the network has forgotten about your transaction. Else, your newly constructed transaction will not propagate well.