When a Pokemon uses transform and gains the move Hidden Power, the type will be based off of the user's IVs because transform only copies the stats themselves (excluding HP). This is why some people don't run max IVs on competitive dittos.
On its own, Hidden Power is normal type. Once the move has been selected by a Pokemon, then it calculates the typing of the move using the user's IVs, even through transform.
Here's a bit from Bulbapedia:
Transform, if used by a Shiny Pokémon, will cause the Pokémon species transformed into to appear Shiny. Likewise, a normal Pokémon transforming into a Shiny target's species will appear as a normal version.
As you know, in Generation II, IVs (or DVs, as they were called then) determined whether Pokemon were shiny. Since a non-shiny Pokemon can use transform on a shiny Pokemon and not become shiny, it shows how the IVs were unchanged upon using transform. This mechanic in transform has remained unchanged since Generation II.
Hope this helps! :)