This is about 100x more complicated than it needs to be.
Send funds from BTC address (A) to new address (B).
Import private key from (A) into bitcoin gold wallet. Coinomi for android works flawlessly, and if you don't have an android device you can emulate it with bluestacks https://www.bluestacks.com/
Send BTG to an exchange that supports BTG such as bittrex or binance
Trade the BTG for BTC
Withdraw the BTC to the address (B) that you created in step 1.
Bing bang boom. None of this nonsense mucking around with... whatever the stuff in this essay is.
You can run Coinomi without an Android device. Install the ARC Welder extension on a Chrome Browser, and download the wallet app, coinomi-1.7.10.apk, from https://coinomi.com/downloads
There are some quirks in Coinomi-on-Chrome. One is that (on a Mac) the shortcut key for Paste (Cmd-V) doesn't work for pasting in a private key. Workaround: type any character or two, select what you've typed, and a "Paste" button pops up. Also, it might not be obvious that to input a private key you want the "Sweep wallet" command from the three-dots menu at the upper right. And, AFAIK you can input only one key at a time, not a list.
Seems to work as an empty wallet -- I'm not quite ready to import private keys into it. I'm using Chrome on a Mac. I installed ARC Welder from
https://chrome.google.com/webstore/detail/arc-welder/emfinbmielocnlhgmfkkmkngdoccbadn/related
and the Coinomi APK at
hmm, maybe just put the addresses you have in your electrum bitcoin wallet here: https://blockchair.com/bitcoin-cash/address/
this is bitcoin cash blockchain explorer. if it will show you some balance, then you have BTH there and then it seems like something is wrong with the electron cash wallet.
bitoin gold is a different thing, the address format chances here, so the are not interchangeable as it is with bitcoin and bitcoin cash. you can check balance if bitcoin gold only by importing the BTH/BTC private key into something AFAIK.