How to display user role

Change:

$user_roles = $current_user->roles;

with

$user = new WP_User( $user_id );
$user_roles = $user->roles;

and the $user_id should e the actual user id who’s role you are trying to get.

Update,

Sorry i just read the author template part so try this:

//first get the current author whos page you are viewing
if(isset($_GET['author_name']))
        $curauth = get_user_by('slug', $author_name);
else
        $curauth = get_userdata(intval($author));
//then get the user object with roles
$user = new WP_User( $$curauth->ID );
$user_roles = $user->roles; 
....