Looking at the Dragonball Z wikia page for Android 17 in the section Interlude (this would be the interlude to the Cell Saga) it says:
After the conflict with Cell, Android 17 becomes a park ranger in the wildlife preserve area of a gigantic royal nature park, where he is well paid. He is an outstanding guard who does not hold back against poachers. It is an ideal job for #17, as he loves to be on his own and is not big on cooperating with others; since he is so good at his job, he takes in a high salary. Android 17 also marries a zoologist; they have one child and two adopted children, and live happily in an isolated house inside the nature park. He went and met #18 and Krillin one time, but did not talk about what he had been up to, maybe because he considers such a wholesome lifestyle embarrassing.[2]
the [2] citation lists the information came from an image from the "Dragon Ball Q&A" section in Dragon Ball Full Color Androids Saga volume 6, 2014
the wikia also goes on to say that he makes brief cameo appearances in the Majin Buu Saga, particular the part involving the battle with Kid Buu. his appearance does kinda looks like that of a ranger