You can’t, FRHITexture and UTexture2D are completely different types of object. RHITexture isn’t even a UObject.
Traditionally the UTexture2D is responsible for creating and then storing a reference to it’s RHI resource - that relationship is one-way.
You’ll probably have to fudge this a bit. The best way would be creating a UTexture2D* object, then passing it’s FRHIResource to your compute shader. Alternatively, you could try creating a new UTexture2D object, and instead of creating the resource, you’ll have to find a way to ‘Set’ the resource to your newly created FRHITexture.
You may have to modify engine source to do that and I have no idea if it’s possible and you’ll probably have to fight some threading issues between render/game thread too.