get_term_children doesn’t return an array of children terms

At first, try passing the Taxonomy as a string:

$children = get_term_children($term->term_id, 'locations');

The function get_category_children produces a string as return, so you can just echo it.
the function get_term_children, however, returns an array. To see the contents of the array, try

print_r( $children );

instead of echo.

The last thing to keep in mind is that a taxonomy does not need to be hierarchical – for example the built in tags. Be sure your “locations” is organized hierarchical, otherwise get_term_children won’t work for you in this case.