The easiest way to do this is as said the probabilistic method. However, for those who prefer non-random constructions, here is a greedy method.
Choose some large $n$ (you can calculate what is needed easily enough).
Start with the empty $n$-vertex graph. Add edges greedily between vertices subject to two conditions. First, the vertices you join should always have distance at least $K$ in the current graph (if not connected, then assume distance is infinite). Second, both vertices should have degree at most $K-1$.
When this procedure is forced to terminate for lack of such pairs, you have a graph with maximum degree $K$ and girth at least $K$. Now take any vertex $v$ of degree less than $K$. Look at all the vertices at distance less than $K$ from $v$ (including $v$). This set must include all the vertices of degree less than $K$, or you would not have terminated. But the set has at most $1+K+K(K-1)+K(K-1)^2+..+K(K-1)^{K-1}=C$ vertices, since the maximum degree is $K$. Similarly, the set of vertices at distance at most $2K$ from $v$ is bounded, and we can presume there are at least $KC^2$ vertices at distance more than $2K$ from $v$. Now joining greedily vertices of degree less than $K$ to these far-away vertices greedily without creating short cycles must succeed (each edge added blocks at most $C$ vertices, and there are certainly not more than $CK$ edges required).
To make this have girth exactly $K$, start with a $K$-cycle. To make it regular is a little harder: one option is to run the first procedure (starting with a $K$-cycle which we insist on preserving forever, to fix the girth) with a much higher distance requirement to join two edges (say $3K$), then after termination, identify a low-degree vertex $u$ and adding an edge to some far-away $v$ (as before) then removing some edge $vw$. Now $w$ cannot have been (before edge removal) a low degree vertex (it is too far away from the first low degree vertex) and furthermore it cannot be within distance $K$ of any remaining low degree vertex, so you can join it to a remaining low degree vertex. Rinse, repeat, assuming $n$ satisfies the parity condition for a $K$-regular graph to exist (and is large enough) you will succeed.