Do you have the tag in the Set Variable: Get Block Type set to Block ID, Block Name or Item? Because for this to work it should be
set to item.
I'm pretty sure that if you enter the variable that you first entered in the Set Variable: Get Block Type
in the Game Action: Set Block
it'll work.
I'll try my best to explain: In the first code block, which in this case is the Set Variable: Get Block Type, you have (hopefully) put two items. The first item should be a renamed variable, this will act as a storage for whatever item/block the variable returns. In the second slot you entered any location. When the code is activated the code block will get the material of the location in item form, it should not be in a string form, then that item will be saved to the first variable. Then, when you want to set a location to whatever block that Set Variable: Get Block Type returned you just enter the variable in the Game Action: Set Block.
Sorry if this hasn't been explained well or isn't what your problem is about.