Yes you have a 20 mile limit absent a different endorsement.
Never forget you have the authority to fly further in an emergency - like you are 18 miles away from home base, make a 180, and there is a wall of black cloud behind you. OK, BAD situational awareness to let those clouds sneak up on you, but it happens. Land (and land legally) at any airport outside of the 20 mile ring as necessary.
Let's turn this into a learning experience. If this happened to you in reality, you may want to file an ASRS report. Ask your CFI about ASRS if it hasn't come up in your ground school yet.
-Skip