Help with structure that generates entity

I'm making a datapack for cobblemon, I would like to make a command or function that would spawn a pokemon called jirachi when the player gets close to it.

Continue to help post