I am feeling a little difficulty in understanding your question since you didnt complete the last part of question.
I assume that you meant as same dimension as that of distance.
in 1/2 gt^2 , 1/2 is irrelavant dimensionwise. so lets skip that.
g has same dimension as that of accelaration . ie m/s^2 = [LT^-2]
the dimension of time^2 is [T^2]
so overall dimension of 1/2 gt^2 becomes = [ LT^-2 *T^2]
this is same dimension as that of distance.
Hope this helps.