This is 1.14 command that changes the pillager data that's in a radius of 5 blocks, turning it into a patrol leader, which makes you able to get the "Bad Omen" effect by killing it.
You can change the "type=minecraft:pillager" to any you want, like Evoker or Vindicator or increase it's radius by changing the "distance=..5" selector.
This command was developed for testing the 1.14 patrol leader function.