They are different. In some cases you could use either, as in the above.
However, "There's another aspect to it."; "You could look at it from the aspect of homosexuality.
'To' is probably more common in the first example above, and 'of' is the only choice in the second.
Student or Learner