This is a hard question to answer. There are really a lot of variables. I see it was posted in 2015, so this is probably a moot issue for you anyway, but I'll give some possible answers so anyone having similar issues can have some avenues to investigate.
First thing I'd do is take it to the vet. You'll hear that a lot, but that's because it's a pretty valid answer. Lots of times when pets start going to the bathroom in abnormal places, it's because of issues like urinary tract infections, bladder crystals (had that with the cat), or other issues. My Jack Russell is turning 15yrs in a couple of weeks and she's currently having issues holding her bladder, especially when she's sleeping. That's mostly musculature in nature. So it's a good idea to rule that kind of thing out.
Assuming you've ruled that out, and being that you've had the dog for two years, I'd think that anything like that would probably clear up in that time. Not necessarily as it could be recurring and you didn't say if it was continuous behavior or whether it comes and goes. You also didn't say if it was male or female, since males naturally want to mark territory and I wouldn't be surprised if it tried to mark the couch.
The next step I'd take is to buy an appropriate pet waste cleaning solution. You can't just use comet cleaner or grease lightning. Pet waste (poop/pee) have odors and chemical markers in them. This is how canine's and other animals mark territory and leave basic messages, such as reproductive readiness and advertise their presence. When a scent begins to fade, they naturally want to mark again to re-up on the scent and make it stronger. Regular cleaners just make the smell weak and encourage them to go again in the same spot. These special cleaning products are supposed to chemically break the scent down, so there is no scent at all. That's supposed to discourage them from going.
The next step I'd take would be to manage the dog. I'd give it water all the time, but I'd feed it at set meal times. Leave the food down for 15min and then take it up. Your dog will probably go hungry for a couple of days, but that's okay. They're smart animals and they'll figure it out quickly. This lets you pretty much know by the clock when your dog will have to eliminate and you can schedule potty walks occasionally.
Here are a few important things to know about this subject. The times when a dog is most likely to need to use the bathroom are right after it wakes up, right after it eats/drinks, or right after play. So in them mornings, I'd feed the dog and then take it for a walk and allow a bathroom break at the end. I know it seems reversed, like you want to get up and use the potty after holding it all night, then take a shower and eat breakfast, but doing all the other first, really encourages them to go and doesn't stimulate them to go again afterwards. If you take your dog out and it doesn't go, and this is at any time, not just the morning walk, take them out again in 15min. Repeat till they go to the bathroom.
Jack Russells are extremely smart, and most dogs can learn my next suggestion. Get a bell by the door or something the dog can use to cue you that they need to go to the bathroom. Use operant conditioning (google and youtube will give you a plethora of info) and teach your dog to ring the bell when they need to use the bathroom. The key to this is that when your dog rings the bell, you should leash the dog, walk them straight to a designated potty area and then stand there ignoring them till they go to the bathroom. If they spend 5-10min and don't potty, take them straight back inside and let them loose in the house. It's extremely important you handle it in this way. If your dog rings the bell and you let them loose in the yard, or even if you allow them to stop and stiff things along the way to the potty area, then you've made it into a lets go play bell and they will drive you batty ringing it all the time. It has to be a potty only, no play bell.
Another thing to try is to section your dog off. For instance, it doesn't need free roam of the house. When not home, you can lock it, with baby gates or doors, on floors that are easy to clean, like linoleum. You can even contain it to these areas when you're home and not able to watch it, like when you're in the showers. If need be, you can keep your dog on a long and light leash, like a $1.50 roll of paracord from your local big box. That way, if you see your dog starting to go, you can use the leash to stop them and carry them straight outside.
Having said that about containing your Jack Russell, these are extremely high energy dogs. Mine lives on a farm and I spent a lot of time when she was younger working the energy off of her. I got a very solid dog that people didn't believe was a jack Russell, because she was behaved. You have to commit to working this energy off every day, because it's not fair to the dog otherwise. We often choose to stay in small areas of our house, like our bedrooms for long periods of time, watching tv or playing games, but that's only acceptable to us because we can leave anytime we choose. A good example everyone can relate to is school. Think of how bored you've gotten in school. I know that even with occasional bouts of excitement, I was sometimes so bored out of my mind that I couldn't concentrate. Now realize that as bored as I was, there was interesting stuff going on. Kids were talking to me or interacting, the teacher was talking about something I didn't know. Even with that stimulus I was bored crazy. Your dog doesn't even have that at home. You're talking about putting him in perpetual school with the same things to look at, listen to, and smell over and over.
The crate has a place, but not as general containment. No one should leave a dog locked in a kennel while they're at work. I know people might argue, but I'm strongly against it. Look at it this way. You're at work/school for 8hrs. My shortest every commute was 10min. Now it's closer to 20min and has been as long as 1hr. That's all one way. So at the shortest, if I don't stop for food or errands, I'm away from home for 8hrs 10min. Then you go to bed. These days, I sleep for about 7hrs a night. We'll go with that, since it's shorter than the recommended 8hrs. So if I locked my dog in a kennel at night when I'm sleeping and can't monitor her, and I lock her in when I'm at work during the day, she's in that kennel for 15hrs and 10min a day, with nothing to do to engage her brain and no way to burn off physical energy. She'd be batty, even at her age. That's 3hrs and 10mins over half the day. That's unacceptable and that's based on sleeping less and not having a life. I don't mind containing a dog to one room, or potentially an ex-pen, but they need lots of varying stimulus. I know leerburg kennels will recommend having toys of different types that engage the dog and they change them out every week or so, so the dog doesn't get bored. Living on a farm, my dog goes outside during the winter days when it's warm enough and is out 24/7 during the summer, so she gets tons of stimulus. I've actually built her an insulated and heated dog house and she's been given an option and usually prefers the dog house to coming inside to the kennel. My thermostat said it was 69.8 degrees in her dog house this morning when the outside temp was in the 20s.
Not everyone has that option, though. I'm just trying to make a point. A dog isn't a pocket book or a video game, you can't get one and don't deserve one just because you want one. I know that sounds harsh, so I want to explain. It's not an attack on you or your care in any way. From this question, I can tell you care about your dogs welfare and are trying to do the best you can for it. I'm saying that you have to think of what's best for the dog, not what you really, really want. There are a lot of dogs I'd love to have, but I'll never own unless I move. All of those are cold weather dogs. I live in SC and it gets super hot and humid. I'm not going to have a dog I have to lock up to keep from having heat stroke. There are so many dog breeds out there that do well in heat that I could never own all those, but that's the pool I'll choose from. Conversely, if I lived in a colder climate, I wouldn't have a short haired, see the freckles when she's wet, Jack Russell. I'd probably have a husky or something similar. I'd never have either if I lived in an apartment. I know myself and that I'm too lazy to provide the needed exercise for them if I had to travel to do so. Now I could take them anywhere on the farm and exercise them with little trouble. I'd also never have a hairy dog, because I don't like the required grooming. I won't do it and mats are painful to the dog. I inherited my grandmothers dog when she passed and the dog is since gone as well, but I spent several years grooming that Keeshound(look it up) and I hated it, but I did it for her sake. You just have to know yourself. Other options are to get older dogs that don't have as much energy. Dogs are also individuals and you can find even Jack Russells that are laid back and chill. Mine is, but that's mostly training as she still has plenty of energy. I'm just saying, that there are options.
It's probably too late now, but if you try a lot of these options and they don't work, there isn't shame in returning the dog to the adoption agency. If you keep a dog with problems like this, you resent them and it causes ill will in the family. It's not worth it, when there is someone that might be more capable at the time of handling it and there will definitely be a dog that you can enjoy that has minimal issues out there.
Lastly, something I won't mention much about as I don't have much knowledge and no personal experience with are mental issues. I know from watching 'My Cat from Hell', that animals can have mental issues like people and I've seen cats on the show get treated and loose these issue. Most of it is training related, but sometimes dogs have issues like anxiety, depression, etc... that can be treated. Again, back to my first advice, see a vet that deals with issues like this and rule them out.
I hope that some if any of this has helped you and I hope you and your dog are now happy and healthy. Good luck.