Version 1: adjusting color
\hrulefill defaults to a thickness of 0.4pt. Here's a snippet that defines a new command in the same vein, \thickhrulefill, that is 3pt thick instead:
\documentclass[10pt]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.fractals}
\makeatletter
\newcommand{\thickhrulefill}{%
\leavevmode\leaders\hrule height 3pt\hfill\kern\z@}
\makeatother
\newcommand{\btest}[1]{%
%parameter #1 is for line color
\color{#1}
\thickhrulefill
{\tikz[decoration=Koch snowflake, line cap=rect]{\draw[line width=3pt] decorate{ (0,-2) -- (3,-2)};}}
}
\begin{document}
\noindent\textbf{Solution 1.1} \btest{gray!50}
\end{document}

I've also adjusted the line caps to line cap=rect to make sure there's no unsightly gaps.
For future reference: the (re-)implementation of \hrulefill was taken from \hrulefill & \dotfill on latexref.xyz.
You can also query the definitions of commands by e.g. latexdef -t latex \hrulefill on the command line (if you're on Windows, use cmd.exe for this), which will say
\hrulefill:
macro:->\protect \hrulefill
\hrulefill :
macro:->\leavevmode \leaders \hrule \hfill \kern \z@
though that's admittedly not so helpful in this particular case since there's no indication of what \hrule's default thickness is or how to change it. (Still useful in general though!)
Version 2: adjust color and thickness
EDIT: here's a version that allows you to set both line color and thickness:
\documentclass[10pt]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.fractals}
\newcommand{\btest}[2]{%
% parameter #1 is for thickness
% parameter #2 is for line color
{\color{#2}
\leavevmode\leaders\hrule height #1\relax\hfill
{\tikz[decoration=Koch snowflake, line cap=rect]{\draw[line width=#1] decorate{ (0,-2) -- (3,-2)};}}}
}
\begin{document}
\noindent\textbf{Solution 1.1} \btest{1pt}{blue!50}
\noindent\textbf{Task1.2} \btest{3pt}{gray!50}
\noindent\textbf{Hint 1.3} \btest{5pt}{red!50}
\end{document}

I've actually gotten rid of the \kerning (\kern\z@) that would usually appear after the \hfill here; I don't think it's needed; and I've enclosed the whole thing in a group to make sure the \color change is local and will not affect subsequent text.
Version 3: adjusting color, thickness and number of snowflake iterations
EDIT 2: as requested, here's a version that allows you to also specify the number of iterations:
\documentclass[10pt]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.fractals}
\newcommand{\ctest}[3]{%
% parameter #1 is for thickness (e.g. 1pt)
% parameter #2 is for line color (e.g. blue!50)
% parameter #3 is for the number of iterations (e.g. 2)
\def\kochpath{(0,-2) -- (3,-2)}%
\foreach \n in {1,...,#3}{\xdef\kochpath{decorate{\kochpath}}}%
{\color{#2}%
\leavevmode\leaders\hrule height #1\relax\hfill%
\tikz[decoration=Koch snowflake, line cap=rect]{\draw[line width=#1] \kochpath;}%
}%
}
\begin{document}
\noindent\textbf{Solution 1.1} \ctest{3pt}{blue!50}{1}
\noindent\textbf{Task 1.2} \ctest{2pt}{gray!50}{2}
\noindent\textbf{Hint 1.3} \ctest{1pt}{red!50}{3}
\end{document}

This works by first defining the initial path, and then using a \foreach loop to successively wrap it in a number of decorate{ ... } statements. (For what \xdef does vs. \def, see egreg's excellent explanation here.)
Version 4: adjusting color, thickness and number of snowflake iterations, and allowing mirroring
EDIT 3: I've tried to also implement the ability to mirror the snowflake curve that @Jesús Álvarez Lobo suggested in a comment:
\documentclass[10pt]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.fractals,calc}
\newcommand{\ctest}[4][false]{%
% parameter #1 is for optional mirroring (i.e. true or false, default: false)
% parameter #2 is for thickness (e.g. 1pt)
% parameter #3 is for line color (e.g. blue!50)
% parameter #4 is for the number of iterations (e.g. 2)
\def\kochpath{(0,-2) -- (3,-2)}%
\foreach \n in {1,...,#4}{\xdef\kochpath{decorate{\kochpath}}}%
{\color{#3}%
\leavevmode\leaders\hrule height #2\relax\hfill%
\tikz[baseline={($(0,-2) - 0.5*(0,#2)$)}, decoration={Koch snowflake, mirror=#1}, line cap=rect]{\draw[line width=#2] \kochpath;}%
}%
}
\begin{document}
\noindent\textbf{Solution 1.1} \ctest{3pt}{blue!50}{1}
\noindent\textbf{Task 1.2} \ctest{2pt}{gray!50}{2}
\noindent\textbf{Hint 1.3} \ctest[true]{1pt}{red!50}{3}
\end{document}

TikZ already includes the ability to mirror a decoration, by using decoration={..., mirror} (see section 24.4.1 of the massive TikZ manual), but when doing so the picture must also be adjusted so that the Koch curve is flush with the preceding \hrule. I've used the baseline option on the tikzpicture environment here, and performed the necessary calculation using the calc TikZ library. Mirroring is controlled by an optional parameter that precedes the rest (this is due to the way \newcommand works).
Speaking of adjustments, I have no idea how much vertical space any of the above versions generate above or below, or how much they should generate --- this can and should be investigated, I guess, but since this has really just been an opportunity for me to learn a little bit more about LaTeX and TikZ for me, I'll leave that to those who want to use these snippets in their documents.
%parameter #1 is for line color \color{#2} \thickhrulefill[#1] {\tikz[decoration=Koch snowflake, line cap=rect]{\draw[line width=#1] decorate{ (0,-2) -- (3,-2)};}}
} – Jesús Álvarez Lobo Apr 14 '21 at 21:54
% parameter #1 is for thickness % parameter #2 is for line color {\color{#2} \leavevmode\leaders\hrule height #1\relax\hfill {\tikz[decoration=Koch snowflake, line cap=rect]{\draw[line width=#1] decorate{decorate{decorate{(0,-2) -- (3,-2)}}};}}} } – Jesús Álvarez Lobo Apr 15 '21 at 09:41
% parameter #1 is for thickness % parameter #2 is for line color % parameter #3 is for the number of iterations (e.g. 2) % parameter #4 is for vertical reflection: #3 = -1 -> reflection, #3 = 1 -> no reflection \def\kochpath{(0,-2) -- (3,-2)}% \foreach \n in {1,...,#3}{\xdef\kochpath{decorate{\kochpath}}}% {\color{#2}%
\leavevmode\leaders\hrule height #1\relax\hfill% \raisebox{1.5pt}{\scalebox{1}[#4]{ \tikz[decoration=Koch snowflake, line cap=rect]{\draw[line width=#1] \kochpath;}}}% }% } – Jesús Álvarez Lobo Apr 16 '21 at 11:57
\textbf{Solution 1.2} \refdec{2pt}{red}{3}{1}
– Jesús Álvarez Lobo Apr 16 '21 at 11:58