Have you copy/pasted the example from the documentation? What looks like double quotes are actually different characters, thanks to Microsoft Word replacing them with "smart" quotes (an option that the author has turned off a few times, but keeps coming back).
Replace the occurrences of ” (ASCII 8221) with " (ASCII 34)
As a side note, the command can be optimized:
If you actually need the variable,
Set text [myVariable] to '{TXTREPLACEVAR:"{CMD}":"test":"monkey"}'
Write [Blue] '{TXT:myVariable}' to log
or if you don't,
Write [Blue] '{TXTREPLACEVAR:"{CMD}":"test":"monkey"}' to log