How to change the following commitment scheme to Pedersen commitment?
My answer one the other question assumed that you use elliptic curves as they usually are more common when it comes to ZKP because of their size and speed, however, you can easily change the notation since


$xG$ is equivalent to $g^x\ (mod\ p)$
$A+B$ is equivalent to $A\cdot B\ (mod\ p)$


I will not explicitly write $(mod\ p)$ from now on.


$P$ chooses a random $r$ and calculates $C=g^r h^{[age]}$.
$P$ signs $a$ with $r$ as private key.
$P \rightarrow T: C,a, signature_a$
$T$ looks up $P$'s age, calculates $R = C \cdot h^{-[age]} = g^rh^{[age]}h^{-[age]}=g^r$, verifies $signature_a$ against $R$ and signs $C$ using $T$'s private key.
$T \rightarrow P: signature_C$
$P \rightarrow V: C, signature_C, proof$