get_permalink(). That function is intended for use inside the loop, and only works for getting the link to posts. It will not work for taxonomy archives, date archives, search results, or the latest posts page.
Normally you can get the URL to the current page with
home_url() combined with
echo home_url( $wp->request );
This is because
home_url() gets your site URL from the database, while
$wp->request holds the path for the current request, which will be the slug for pages, date for archives, etc.
The problem with plain permalinks is that they don't use the request path, because this requires the standard .htaccess setup. Instead WordPress uses the query string to determine what to load.
So what you need to do is get the current query vars and append those to the URL. Thankfully those are also available in
$wp, specifically as
$wp->query_vars. This is an array of vars and values, so you can pass it directly to
echo add_query_arg( $wp->query_vars, home_url() );