I think the HD guy misunderstood the question.
If you asked what to use after the pipe comes out of the leaking boiler, you would use high temp cement for the pipe connection to a chimney flue on the inside of a building only. Like where it connects in the basement or utility room into a chimney opening, this is the normal drill.
On the exterior of your roof, you would never use cement. It would be a metal collar if there was high temp at the roof connection.Just like what you already have. What you have looks like a rolled roof, or BUR roof, regardless, you will be fine with tar. However it will need to be maintained until you change the roof, This means every year you do a check for cracks.
If it is a rubber roof, like a bike tire tube, then you use rubberized caulk.
Remove all that mess and start over.
Let us know and we may be able to help further.